diff --git a/packages/flutter_tools/lib/src/commands/analyze.dart b/packages/flutter_tools/lib/src/commands/analyze.dart index 6ed4de35bcb..a4f980c97b3 100644 --- a/packages/flutter_tools/lib/src/commands/analyze.dart +++ b/packages/flutter_tools/lib/src/commands/analyze.dart @@ -31,8 +31,8 @@ class AnalyzeCommand extends FlutterCommand { argParser.addFlag('preamble', help: 'Display the number of files that will be analyzed.', defaultsTo: true); argParser.addFlag('congratulate', help: 'Show output even when there are no errors, warnings, hints, or lints.', defaultsTo: true); argParser.addFlag('watch', help: 'Run analysis continuously, watching the filesystem for changes.', negatable: false); - argParser.addOption('write', help: 'Also output the results to a file. This is useful with --watch if you want a file to always contain the latest results.'); - argParser.addOption('dart-sdk', help: 'The path to the Dart SDK.', hide: true); + argParser.addOption('write', valueHelp: 'file', help: 'Also output the results to a file. This is useful with --watch if you want a file to always contain the latest results.'); + argParser.addOption('dart-sdk', valueHelp: 'path-to-sdk', help: 'The path to the Dart SDK.', hide: true); // Hidden option to enable a benchmarking mode. argParser.addFlag('benchmark', negatable: false, hide: true); diff --git a/packages/flutter_tools/lib/src/commands/install.dart b/packages/flutter_tools/lib/src/commands/install.dart index 1e4b5f97619..d79f05ece14 100644 --- a/packages/flutter_tools/lib/src/commands/install.dart +++ b/packages/flutter_tools/lib/src/commands/install.dart @@ -33,11 +33,11 @@ class InstallCommand extends FlutterCommand { } } -bool installApp(Device device, ApplicationPackage package) { +bool installApp(Device device, ApplicationPackage package, { bool uninstall: true }) { if (package == null) return false; - if (device.isAppInstalled(package)) { + if (uninstall && device.isAppInstalled(package)) { printStatus('Uninstalling old version...'); if (!device.uninstallApp(package)) printError('Warning: uninstalling old version failed'); diff --git a/packages/flutter_tools/lib/src/commands/run.dart b/packages/flutter_tools/lib/src/commands/run.dart index 60d96556c81..8e072d08b5c 100644 --- a/packages/flutter_tools/lib/src/commands/run.dart +++ b/packages/flutter_tools/lib/src/commands/run.dart @@ -213,7 +213,7 @@ Future startApp( if (install && device is AndroidDevice) { printStatus('Installing $package to $device...'); - if (!(installApp(device, package))) + if (!(installApp(device, package, uninstall: false))) return 1; } diff --git a/packages/flutter_tools/lib/src/run.dart b/packages/flutter_tools/lib/src/run.dart index 7c757963e5c..495d7ebf0c2 100644 --- a/packages/flutter_tools/lib/src/run.dart +++ b/packages/flutter_tools/lib/src/run.dart @@ -164,7 +164,7 @@ class RunAndStayResident { // TODO(devoncarew): This fails for ios devices - we haven't built yet. if (device is AndroidDevice) { printTrace('Running install command.'); - if (!(installApp(device, _package))) + if (!(installApp(device, _package, uninstall: false))) return 1; }