| 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 4d97b52afbcf6b37caed2b19d12ce918c47f3c97..9fc723c8c37faa65068035b30226f16b6ba6082f 100644
|
| --- a/sdk/lib/_internal/pub/lib/src/command_lish.dart
|
| +++ b/sdk/lib/_internal/pub/lib/src/command_lish.dart
|
| @@ -17,6 +17,7 @@ import 'command.dart';
|
| import 'directory_tree.dart';
|
| import 'exit_codes.dart' as exit_codes;
|
| import 'git.dart' as git;
|
| +import 'hosted_source.dart';
|
| import 'http.dart';
|
| import 'io.dart';
|
| import 'log.dart' as log;
|
| @@ -30,19 +31,6 @@ class LishCommand extends PubCommand {
|
| final usage = "pub publish [options]";
|
| final aliases = const ["lish", "lush"];
|
|
|
| - ArgParser get commandParser {
|
| - var parser = new ArgParser();
|
| - // TODO(nweiz): Use HostedSource.defaultUrl as the default value once we use
|
| - // dart:io for HTTPS requests.
|
| - parser.addFlag('dry-run', abbr: 'n', negatable: false,
|
| - help: 'Validate but do not publish the package.');
|
| - parser.addFlag('force', abbr: 'f', negatable: false,
|
| - help: 'Publish without confirmation if there are no errors.');
|
| - parser.addOption('server', defaultsTo: 'https://pub.dartlang.org',
|
| - help: 'The package server to which to upload this package.');
|
| - return parser;
|
| - }
|
| -
|
| /// The URL of the server to which to upload the package.
|
| Uri get server => Uri.parse(commandOptions['server']);
|
|
|
| @@ -52,6 +40,15 @@ class LishCommand extends PubCommand {
|
| /// Whether the publish requires confirmation.
|
| bool get force => commandOptions['force'];
|
|
|
| + LishCommand() {
|
| + commandParser.addFlag('dry-run', abbr: 'n', negatable: false,
|
| + help: 'Validate but do not publish the package.');
|
| + commandParser.addFlag('force', abbr: 'f', negatable: false,
|
| + help: 'Publish without confirmation if there are no errors.');
|
| + commandParser.addOption('server', defaultsTo: HostedSource.DEFAULT_URL,
|
| + help: 'The package server to which to upload this package.');
|
| + }
|
| +
|
| Future _publish(packageBytes) {
|
| var cloudStorageUrl;
|
| return oauth2.withClient(cache, (client) {
|
|
|