misc tool ui cleanup

This commit is contained in:
Devon Carew
2016-03-14 09:41:00 -07:00
parent 229253f43e
commit 4daee0cc0d
6 changed files with 37 additions and 18 deletions

View File

@@ -42,6 +42,12 @@ Future<Null> main(List<String> args) async {
bool verbose = args.contains('-v') || args.contains('--verbose');
bool verboseHelp = help && verbose;
if (verboseHelp) {
// Remove the verbose option; for help, users don't need to see verbose logs.
args = new List<String>.from(args);
args.removeWhere((String option) => option == '-v' || option == '--verbose');
}
FlutterCommandRunner runner = new FlutterCommandRunner(verboseHelp: verboseHelp)
..addCommand(new AnalyzeCommand())
..addCommand(new ApkCommand())
@@ -75,7 +81,10 @@ Future<Null> main(List<String> args) async {
exit(result);
}, onError: (dynamic error, Chain chain) {
if (error is UsageException) {
stderr.writeln(error);
stderr.writeln(error.message);
stderr.writeln();
stderr.writeln("Run 'flutter -h' (or 'flutter <command> -h') for available "
"flutter commands and options.");
// Argument error exit code.
exit(64);
} else if (error is ProcessExit) {