Refactor flutter command exit code - part 3 of 3 (#6838)

* Remove the workaround that pinned args to v0.13.6
This reverts most of the changes in commit 6331b6c8b5
* throw exception if exit code is not an integer
* rework command infrastructure to throw ToolExit when non-zero exitCode
* convert commands to return Future<Null>
* cleanup remaining commands to use throwToolExit for non-zero exit code
* remove isUnusual exception message
* add type annotations for updated args package
This commit is contained in:
Dan Rubel
2016-11-14 14:21:30 -05:00
committed by GitHub
parent ece851d5cd
commit 34e466f1fd
63 changed files with 167 additions and 348 deletions

View File

@@ -6,7 +6,7 @@ import 'package:args/command_runner.dart';
import 'package:flutter_tools/src/runner/flutter_command.dart';
import 'package:flutter_tools/src/runner/flutter_command_runner.dart';
CommandRunner createTestCommandRunner([FlutterCommand command]) {
CommandRunner<Null> createTestCommandRunner([FlutterCommand command]) {
FlutterCommandRunner runner = new FlutterCommandRunner();
if (command != null)
runner.addCommand(command);