OLD | NEW |
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 import 'dart:async'; | 5 import 'dart:async'; |
6 import 'dart:io'; | 6 import 'dart:io'; |
7 import 'dart:math' as math; | 7 import 'dart:math' as math; |
8 | 8 |
9 import 'package:args/args.dart'; | 9 import 'package:args/args.dart'; |
10 import 'package:path/path.dart' as path; | 10 import 'package:path/path.dart' as path; |
11 | 11 |
12 import '../lib/src/command.dart'; | 12 import '../lib/src/command.dart'; |
13 import '../lib/src/exit_codes.dart' as exit_codes; | 13 import '../lib/src/exit_codes.dart' as exit_codes; |
14 import '../lib/src/io.dart'; | 14 import '../lib/src/io.dart'; |
15 import '../lib/src/log.dart' as log; | 15 import '../lib/src/log.dart' as log; |
16 import '../lib/src/sdk.dart' as sdk; | 16 import '../lib/src/sdk.dart' as sdk; |
17 import '../lib/src/system_cache.dart'; | |
18 import '../lib/src/utils.dart'; | 17 import '../lib/src/utils.dart'; |
19 | 18 |
20 final pubArgParser = initArgParser(); | 19 final pubArgParser = initArgParser(); |
21 | 20 |
22 void main() { | 21 void main() { |
23 ArgResults options; | 22 ArgResults options; |
24 | 23 |
25 try { | 24 try { |
26 options = pubArgParser.parse(new Options().arguments); | 25 options = pubArgParser.parse(new Options().arguments); |
27 } on FormatException catch (e) { | 26 } on FormatException catch (e) { |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 for (var name in names) { | 160 for (var name in names) { |
162 buffer.write(' ${padRight(name, length)} ' | 161 buffer.write(' ${padRight(name, length)} ' |
163 '${PubCommand.commands[name].description}\n'); | 162 '${PubCommand.commands[name].description}\n'); |
164 } | 163 } |
165 | 164 |
166 buffer.write('\n'); | 165 buffer.write('\n'); |
167 buffer.write( | 166 buffer.write( |
168 'Use "pub help [command]" for more information about a command.'); | 167 'Use "pub help [command]" for more information about a command.'); |
169 log.message(buffer.toString()); | 168 log.message(buffer.toString()); |
170 } | 169 } |
OLD | NEW |