forked from firka/flutter
Always fake ProcessManager when you fake Filesystem in tests (#42369)
...because otherwise, processes that think they're manipulating your filesystem will be doing crazy things the test is ignoring, leading to (at best) failures and (at worst) flakes or disk corruption.
This commit is contained in:
@@ -1069,7 +1069,8 @@ class ProjectFileInvalidator {
|
||||
final List<Uri> invalidatedFiles = <Uri>[];
|
||||
for (final Uri uri in urisToScan) {
|
||||
final DateTime updatedAt = fs.statSync(
|
||||
uri.toFilePath(windows: platform.isWindows)).modified;
|
||||
uri.toFilePath(windows: platform.isWindows),
|
||||
).modified;
|
||||
if (updatedAt != null && updatedAt.isAfter(lastCompiled)) {
|
||||
invalidatedFiles.add(uri);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user