Chromium Code Reviews

Unified Diff: sdk/lib/_internal/pub/lib/src/command/lish.dart

Issue 138723005: Support subcommands in pub and pub help. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Infer hiddenness from subcommands. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command/help.dart ('k') | sdk/lib/_internal/pub/lib/src/log.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/command/lish.dart
diff --git a/sdk/lib/_internal/pub/lib/src/command/lish.dart b/sdk/lib/_internal/pub/lib/src/command/lish.dart
index bd9c445ef4d67012bfb9b215e78283c0bf205a50..d5e46763ecf3ad6641924a86a9c0c79be768390e 100644
--- a/sdk/lib/_internal/pub/lib/src/command/lish.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/lish.dart
@@ -10,7 +10,6 @@ import 'package:http/http.dart' as http;
import '../command.dart';
import '../directory_tree.dart';
-import '../exit_codes.dart' as exit_codes;
import '../http.dart';
import '../io.dart';
import '../log.dart' as log;
@@ -94,9 +93,7 @@ class LishCommand extends PubCommand {
Future onRun() {
if (force && dryRun) {
- log.error('Cannot use both --force and --dry-run.');
- this.printUsage();
- return flushThenExit(exit_codes.USAGE);
+ usageError('Cannot use both --force and --dry-run.');
}
var packageBytesFuture = entrypoint.packageFiles().then((files) {
@@ -144,15 +141,15 @@ class LishCommand extends PubCommand {
if (dryRun) {
var s = warnings.length == 1 ? '' : 's';
- log.warning("Package has ${warnings.length} warning$s.");
+ log.warning("\nPackage has ${warnings.length} warning$s.");
return false;
}
- var message = 'Looks great! Are you ready to upload your package';
+ var message = '\nLooks great! Are you ready to upload your package';
if (!warnings.isEmpty) {
var s = warnings.length == 1 ? '' : 's';
- message = "Package has ${warnings.length} warning$s. Upload anyway";
+ message = "\nPackage has ${warnings.length} warning$s. Upload anyway";
}
return confirm(message).then((confirmed) {
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command/help.dart ('k') | sdk/lib/_internal/pub/lib/src/log.dart » ('j') | no next file with comments »

Powered by Google App Engine