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