| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 'normal': 'Show errors, warnings, and user messages.', | 54 'normal': 'Show errors, warnings, and user messages.', |
| 55 'io': 'Also show IO operations.', | 55 'io': 'Also show IO operations.', |
| 56 'solver': 'Show steps during version resolution.', | 56 'solver': 'Show steps during version resolution.', |
| 57 'all': 'Show all output including internal tracing messages.' | 57 'all': 'Show all output including internal tracing messages.' |
| 58 }); | 58 }); |
| 59 argParser.addFlag('verbose', abbr: 'v', negatable: false, | 59 argParser.addFlag('verbose', abbr: 'v', negatable: false, |
| 60 help: 'Shortcut for "--verbosity=all".'); | 60 help: 'Shortcut for "--verbosity=all".'); |
| 61 argParser.addFlag('with-prejudice', hide: !isAprilFools, | 61 argParser.addFlag('with-prejudice', hide: !isAprilFools, |
| 62 negatable: false, help: 'Execute commands with prejudice.'); | 62 negatable: false, help: 'Execute commands with prejudice.'); |
| 63 argParser.addFlag('package-symlinks', | 63 argParser.addFlag('package-symlinks', |
| 64 negatable: true, defaultsTo: true, | 64 negatable: true, defaultsTo: true, hide: true, |
| 65 help: "Generate packages/ directories when installing packages."); | 65 help: "Generate packages/ directories when installing packages."); |
| 66 | 66 |
| 67 addCommand(new BuildCommand()); | 67 addCommand(new BuildCommand()); |
| 68 addCommand(new CacheCommand()); | 68 addCommand(new CacheCommand()); |
| 69 addCommand(new DepsCommand()); | 69 addCommand(new DepsCommand()); |
| 70 addCommand(new DowngradeCommand()); | 70 addCommand(new DowngradeCommand()); |
| 71 addCommand(new GlobalCommand()); | 71 addCommand(new GlobalCommand()); |
| 72 addCommand(new GetCommand()); | 72 addCommand(new GetCommand()); |
| 73 addCommand(new ListPackageDirsCommand()); | 73 addCommand(new ListPackageDirsCommand()); |
| 74 addCommand(new LishCommand()); | 74 addCommand(new LishCommand()); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 Future _validatePlatform() async { | 215 Future _validatePlatform() async { |
| 216 if (Platform.operatingSystem != 'windows') return; | 216 if (Platform.operatingSystem != 'windows') return; |
| 217 | 217 |
| 218 var result = await runProcess('ver', []); | 218 var result = await runProcess('ver', []); |
| 219 if (result.stdout.join('\n').contains('XP')) { | 219 if (result.stdout.join('\n').contains('XP')) { |
| 220 log.error('Sorry, but pub is not supported on Windows XP.'); | 220 log.error('Sorry, but pub is not supported on Windows XP.'); |
| 221 await flushThenExit(exit_codes.USAGE); | 221 await flushThenExit(exit_codes.USAGE); |
| 222 } | 222 } |
| 223 } | 223 } |
| 224 } | 224 } |
| OLD | NEW |