OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 /** | 5 /** |
6 * The main entrypoint for the pub command line application. | 6 * The main entrypoint for the pub command line application. |
7 */ | 7 */ |
8 library pub; | 8 library pub; |
9 | 9 |
10 import '../../pkg/args/lib/args.dart'; | 10 import '../../pkg/args/lib/args.dart'; |
| 11 import '../../pkg/path/lib/path.dart' as path; |
11 import 'dart:io'; | 12 import 'dart:io'; |
12 import 'dart:math'; | 13 import 'dart:math'; |
13 import 'http.dart'; | 14 import 'http.dart'; |
14 import 'io.dart'; | 15 import 'io.dart'; |
15 import 'command_help.dart'; | 16 import 'command_help.dart'; |
16 import 'command_install.dart'; | 17 import 'command_install.dart'; |
17 import 'command_lish.dart'; | 18 import 'command_lish.dart'; |
18 import 'command_update.dart'; | 19 import 'command_update.dart'; |
19 import 'command_uploader.dart'; | 20 import 'command_uploader.dart'; |
20 import 'command_version.dart'; | 21 import 'command_version.dart'; |
21 import 'entrypoint.dart'; | 22 import 'entrypoint.dart'; |
22 import 'exit_codes.dart' as exit_codes; | 23 import 'exit_codes.dart' as exit_codes; |
23 import 'log.dart' as log; | 24 import 'log.dart' as log; |
24 import 'package.dart'; | 25 import 'package.dart'; |
25 import 'path.dart' as path; | |
26 import 'pubspec.dart'; | 26 import 'pubspec.dart'; |
27 import 'source.dart'; | 27 import 'source.dart'; |
28 import 'source_registry.dart'; | 28 import 'source_registry.dart'; |
29 import 'system_cache.dart'; | 29 import 'system_cache.dart'; |
30 import 'utils.dart'; | 30 import 'utils.dart'; |
31 import 'version.dart'; | 31 import 'version.dart'; |
32 | 32 |
33 Version get pubVersion => new Version(0, 0, 0); | 33 Version get pubVersion => new Version(0, 0, 0); |
34 | 34 |
35 /** | 35 /** |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 if (exception is HttpException || exception is HttpParserException || | 317 if (exception is HttpException || exception is HttpParserException || |
318 exception is SocketIOException || exception is PubHttpException) { | 318 exception is SocketIOException || exception is PubHttpException) { |
319 return exit_codes.UNAVAILABLE; | 319 return exit_codes.UNAVAILABLE; |
320 } else if (exception is FormatException) { | 320 } else if (exception is FormatException) { |
321 return exit_codes.DATA; | 321 return exit_codes.DATA; |
322 } else { | 322 } else { |
323 return 1; | 323 return 1; |
324 } | 324 } |
325 } | 325 } |
326 } | 326 } |
OLD | NEW |