Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(984)

Side by Side Diff: lib/src/command.dart

Issue 1277773002: Support resources in "pub run" and "pub global run". (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | lib/src/executable.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library pub.command; 5 library pub.command;
6 6
7 import 'package:args/args.dart'; 7 import 'package:args/args.dart';
8 import 'package:args/command_runner.dart'; 8 import 'package:args/command_runner.dart';
9 import 'package:path/path.dart' as path;
10 9
11 import 'entrypoint.dart'; 10 import 'entrypoint.dart';
12 import 'log.dart' as log; 11 import 'log.dart' as log;
13 import 'global_packages.dart'; 12 import 'global_packages.dart';
14 import 'system_cache.dart'; 13 import 'system_cache.dart';
15 14
16 /// The base class for commands for the pub executable. 15 /// The base class for commands for the pub executable.
17 /// 16 ///
18 /// A command may either be a "leaf" command or it may be a parent for a set 17 /// A command may either be a "leaf" command or it may be a parent for a set
19 /// of subcommands. Only leaf commands are ever actually invoked. If a command 18 /// of subcommands. Only leaf commands are ever actually invoked. If a command
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 /// 84 ///
86 /// If the parsing fails, prints a usage message and exits. 85 /// If the parsing fails, prints a usage message and exits.
87 int parseInt(String intString, String name) { 86 int parseInt(String intString, String name) {
88 try { 87 try {
89 return int.parse(intString); 88 return int.parse(intString);
90 } on FormatException catch (_) { 89 } on FormatException catch (_) {
91 usageException('Could not parse $name "$intString".'); 90 usageException('Could not parse $name "$intString".');
92 } 91 }
93 } 92 }
94 } 93 }
OLDNEW
« no previous file with comments | « no previous file | lib/src/executable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698