Skip to content
Snippets Groups Projects
Commit b674bce6 authored by kevmoo@j832.com's avatar kevmoo@j832.com Committed by Natalie Weizenbaum
Browse files

pkg/args: expose immutable collections

BUG= https://code.google.com/p/dart/issues/detail?id=10127
R=rnystrom@google.com

Review URL: https://codereview.chromium.org//19810004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@25347 260f80e4-7a28-3924-810f-c04153c831b5
parent 66747990
No related branches found
No related tags found
No related merge requests found
......@@ -44,12 +44,14 @@ class UploaderCommand extends PubCommand {
exit(exit_codes.USAGE);
}
var command = commandOptions.rest.removeAt(0);
var rest = commandOptions.rest.toList();
var command = rest.removeAt(0);
if (!['add', 'remove'].contains(command)) {
log.error('Unknown uploader command "$command".');
this.printUsage();
exit(exit_codes.USAGE);
} else if (commandOptions.rest.isEmpty) {
} else if (rest.isEmpty) {
log.error('No uploader given for "pub uploader $command".');
this.printUsage();
exit(exit_codes.USAGE);
......@@ -60,7 +62,7 @@ class UploaderCommand extends PubCommand {
if (package != null) return package;
return new Entrypoint(path.current, cache).root.name;
}).then((package) {
var uploader = commandOptions.rest[0];
var uploader = rest[0];
return oauth2.withClient(cache, (client) {
if (command == 'add') {
var url = server.resolve("/api/packages/"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment