Index: sdk/lib/_internal/pub/lib/src/command/help.dart |
diff --git a/sdk/lib/_internal/pub/lib/src/command/help.dart b/sdk/lib/_internal/pub/lib/src/command/help.dart |
index 854d3cdc0d82b9fecd821cbfdc670e4e439b16e7..75e651a7209c4ffa4d9ff86b01774c3cb521734f 100644 |
--- a/sdk/lib/_internal/pub/lib/src/command/help.dart |
+++ b/sdk/lib/_internal/pub/lib/src/command/help.dart |
@@ -9,6 +9,7 @@ import 'dart:io' as io; |
import '../command.dart'; |
import '../exit_codes.dart' as exit_codes; |
+import '../io.dart'; |
import '../log.dart' as log; |
/// Handles the `help` pub command. |
@@ -26,7 +27,7 @@ class HelpCommand extends PubCommand { |
if (command == null) { |
log.error('Could not find a command named "$name".'); |
log.error('Run "pub help" to see available commands.'); |
- io.exit(exit_codes.USAGE); |
+ return flushThenExit(exit_codes.USAGE); |
} |
command.printUsage(); |