diff --git a/packages/flutter_tools/lib/src/commands/update_packages.dart b/packages/flutter_tools/lib/src/commands/update_packages.dart index fff606c819..1ab825720d 100644 --- a/packages/flutter_tools/lib/src/commands/update_packages.dart +++ b/packages/flutter_tools/lib/src/commands/update_packages.dart @@ -249,7 +249,12 @@ class UpdatePackagesCommand extends FlutterCommand { fakePackage.createSync(); fakePackage.writeAsStringSync(_generateFakePubspec(dependencies.values)); // First we run "pub upgrade" on this generated package: - await pubGet(context: PubContext.updatePackages, directory: tempDir.path, upgrade: true, checkLastModified: false); + await pubGet( + context: PubContext.updatePackages, + directory: tempDir.path, + upgrade: true, + checkLastModified: false, + ); // Then we run "pub deps --style=compact" on the result. We pipe all the // output to tree.fill(), which parses it so that it can create a graph // of all the dependencies so that we can figure out the transitive diff --git a/packages/flutter_tools/lib/src/dart/pub.dart b/packages/flutter_tools/lib/src/dart/pub.dart index ca694e9b94..b31caf8b02 100644 --- a/packages/flutter_tools/lib/src/dart/pub.dart +++ b/packages/flutter_tools/lib/src/dart/pub.dart @@ -96,9 +96,9 @@ Future pubGet({ 'Running "flutter pub $command" in ${fs.path.basename(directory)}...', timeout: timeoutConfiguration.slowOperation, ); + final bool verbose = FlutterCommand.current != null && FlutterCommand.current.globalResults['verbose']; final List args = [ - '--verbosity=warning', - if (FlutterCommand.current != null && FlutterCommand.current.globalResults['verbose']) '--verbose', + if (verbose) '--verbose' else '--verbosity=warning', ...[command, '--no-precompile'], if (offline) '--offline', ];