Make subcommands return success instead of null (#48100)

This commit is contained in:
Emmanuel Garcia
2020-01-10 11:28:01 -08:00
committed by Flutter GitHub Bot
parent a8c5f4e8c4
commit ec2d58335a
48 changed files with 165 additions and 83 deletions

View File

@@ -171,7 +171,9 @@ class BuildEvent extends UsageEvent {
/// An event that reports the result of a top-level command.
class CommandResultEvent extends UsageEvent {
CommandResultEvent(String commandPath, FlutterCommandResult result)
: super(commandPath, result?.toString() ?? 'unspecified');
: assert(commandPath != null),
assert(result != null),
super(commandPath, result.toString());
@override
void send() {