Visitar URL original
fuchsia_ctl by dnfield · Pull Request #32 · flutter/packages · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
exit on incorrect usage
  • Loading branch information
dnfield committed Sep 12, 2019
commit c13ac616ff5b5b23a6a2be98d5d143925d8089b9
4 changes: 2 additions & 2 deletions packages/fuchsia_ctl/bin/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ Future<void> main(List<String> args) async {
if (results.command == null) {
stderr.writeln('Unknown command, expected one of: ${parser.commands.keys}');
stderr.writeln(parser.usage);
return;
exit(-1);
}
final AsyncResult command = commands[results.command.name];
if (command == null) {
stderr.writeln('Unkown command ${results.command.name}.');
stderr.writeln(parser.usage);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we have non-zero exit code here as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done (here and line 82)

return;
exit(-1);
}
final OperationResult result = await command(
results['device-name'],
Expand Down