Revert "Make sure flutter update-packages --verify-only has a non-zero exit code (#15962)" (#16089)

This reverts commit cfda7a65487dbad44bbeeca1516f84b7166bded6.
This commit is contained in:
Todd Volkert 2018-03-29 21:34:31 -07:00 committed by GitHub
parent cfda7a6548
commit 8d6673dcf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,7 +101,6 @@ class UpdatePackagesCommand extends FlutterCommand {
final bool isVerifyOnly = argResults['verify-only'];
if (isVerifyOnly) {
bool needsUpdate = false;
printStatus('Verifying pubspecs...');
for (Directory directory in packages) {
final PubspecYaml pubspec = new PubspecYaml(directory);
@ -127,23 +126,15 @@ class UpdatePackagesCommand extends FlutterCommand {
if (checksum != pubspec.checksum.value) {
// If the checksum doesn't match, they may have added or removed some dependencies.
// we need to run update-packages to recapture the transitive deps.
printError(
printStatus(
'Warning: pubspec in ${directory.path} has invalid dependencies. '
'Please run "flutter update-packages --force-upgrade" to update them correctly.'
'Please run "flutter update-packages" --force-upgrade to update them correctly.'
);
needsUpdate = true;
} else {
// everything is correct in the pubspec.
printStatus('pubspec in ${directory.path} is up to date!');
}
}
if (needsUpdate) {
throwToolExit(
'Warning: one or more pubspecs have invalid dependencies. '
'Please run "flutter update-packages --force-upgrade" to update them correctly.',
exitCode: 1,
);
}
return;
}