mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
parent
bb2e7b5250
commit
e91f3eef46
@ -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);
|
||||
|
@ -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');
|
||||
|
@ -213,7 +213,7 @@ Future<int> startApp(
|
||||
if (install && device is AndroidDevice) {
|
||||
printStatus('Installing $package to $device...');
|
||||
|
||||
if (!(installApp(device, package)))
|
||||
if (!(installApp(device, package, uninstall: false)))
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user