This reverts commit cfda7a65487dbad44bbeeca1516f84b7166bded6.
This commit is contained in:
parent
cfda7a6548
commit
8d6673dcf0
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user