Index: sdk/lib/_internal/pub/lib/src/command/list_package_dirs.dart |
diff --git a/sdk/lib/_internal/pub/lib/src/command/list_package_dirs.dart b/sdk/lib/_internal/pub/lib/src/command/list_package_dirs.dart |
index f16ad65fd3be5877e4af37ee3ebed84db93e6006..5fbdcbfc8fe33f6bf082df2578f17a53bc62a345 100644 |
--- a/sdk/lib/_internal/pub/lib/src/command/list_package_dirs.dart |
+++ b/sdk/lib/_internal/pub/lib/src/command/list_package_dirs.dart |
@@ -12,6 +12,7 @@ import 'package:path/path.dart' as path; |
import '../command.dart'; |
import '../exit_codes.dart' as exit_codes; |
+import '../io.dart'; |
import '../log.dart' as log; |
/// Handles the `list-package-dirs` pub command. |
@@ -30,7 +31,7 @@ class ListPackageDirsCommand extends PubCommand { |
if (!entrypoint.lockFileExists) { |
log.error(JSON.encode( |
'Package "myapp" has no lockfile. Please run "pub install" first.')); |
- exit(exit_codes.NO_INPUT); |
+ return flushThenExit(exit_codes.NO_INPUT); |
} |
var output = {}; |