_DefaultPub.get has this code:
final File currentVersion = _fileSystem.file(
_fileSystem.path.join(Cache.flutterRoot!, 'version'));
// ...
if (/*...*?
lastVersion.readAsStringSync() == currentVersion.readAsStringSync()) {
// ...
That code has a race condition. If that command runs in parallel with another flutter command, there's no guarantee that the currentVersion file will still be around.
We should not release the lockfile until after this test is done.
cc @christopherfujino @jmagman
_DefaultPub.gethas this code:That code has a race condition. If that command runs in parallel with another
fluttercommand, there's no guarantee that thecurrentVersionfile will still be around.We should not release the lockfile until after this test is done.
cc @christopherfujino @jmagman