OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_runner; | 5 library pub.command_runner; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 | 9 |
10 import 'package:args/args.dart'; | 10 import 'package:args/args.dart'; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 allowedHelp: { | 49 allowedHelp: { |
50 'normal': 'Show errors, warnings, and user messages.', | 50 'normal': 'Show errors, warnings, and user messages.', |
51 'io': 'Also show IO operations.', | 51 'io': 'Also show IO operations.', |
52 'solver': 'Show steps during version resolution.', | 52 'solver': 'Show steps during version resolution.', |
53 'all': 'Show all output including internal tracing messages.' | 53 'all': 'Show all output including internal tracing messages.' |
54 }); | 54 }); |
55 argParser.addFlag('verbose', abbr: 'v', negatable: false, | 55 argParser.addFlag('verbose', abbr: 'v', negatable: false, |
56 help: 'Shortcut for "--verbosity=all".'); | 56 help: 'Shortcut for "--verbosity=all".'); |
57 argParser.addFlag('with-prejudice', hide: !isAprilFools, | 57 argParser.addFlag('with-prejudice', hide: !isAprilFools, |
58 negatable: false, help: 'Execute commands with prejudice.'); | 58 negatable: false, help: 'Execute commands with prejudice.'); |
59 argParser.addFlag('package-symlinks', hide: true, negatable: true, | 59 argParser.addFlag('package-symlinks', |
60 defaultsTo: true); | 60 negatable: true, defaultsTo: true, |
| 61 help: "Generate packages/ directories when installing packages."); |
61 | 62 |
62 addCommand(new BuildCommand()); | 63 addCommand(new BuildCommand()); |
63 addCommand(new CacheCommand()); | 64 addCommand(new CacheCommand()); |
64 addCommand(new DepsCommand()); | 65 addCommand(new DepsCommand()); |
65 addCommand(new DowngradeCommand()); | 66 addCommand(new DowngradeCommand()); |
66 addCommand(new GlobalCommand()); | 67 addCommand(new GlobalCommand()); |
67 addCommand(new GetCommand()); | 68 addCommand(new GetCommand()); |
68 addCommand(new ListPackageDirsCommand()); | 69 addCommand(new ListPackageDirsCommand()); |
69 addCommand(new LishCommand()); | 70 addCommand(new LishCommand()); |
70 addCommand(new RunCommand()); | 71 addCommand(new RunCommand()); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 Future _validatePlatform() async { | 175 Future _validatePlatform() async { |
175 if (Platform.operatingSystem != 'windows') return; | 176 if (Platform.operatingSystem != 'windows') return; |
176 | 177 |
177 var result = await runProcess('ver', []); | 178 var result = await runProcess('ver', []); |
178 if (result.stdout.join('\n').contains('XP')) { | 179 if (result.stdout.join('\n').contains('XP')) { |
179 log.error('Sorry, but pub is not supported on Windows XP.'); | 180 log.error('Sorry, but pub is not supported on Windows XP.'); |
180 await flushThenExit(exit_codes.USAGE); | 181 await flushThenExit(exit_codes.USAGE); |
181 } | 182 } |
182 } | 183 } |
183 } | 184 } |
OLD | NEW |