OLD | NEW |
1 library pub.command.global_activate; | 1 library pub.command.global_activate; |
2 import 'dart:async'; | 2 import 'dart:async'; |
| 3 import 'package:pub_semver/pub_semver.dart'; |
3 import '../command.dart'; | 4 import '../command.dart'; |
4 import '../utils.dart'; | 5 import '../utils.dart'; |
5 import '../version.dart'; | |
6 class GlobalActivateCommand extends PubCommand { | 6 class GlobalActivateCommand extends PubCommand { |
7 String get description => "Make a package's executables globally available."; | 7 String get description => "Make a package's executables globally available."; |
8 String get usage => "pub global activate <package...>"; | 8 String get usage => "pub global activate <package...>"; |
9 bool get takesArguments => true; | 9 bool get takesArguments => true; |
10 GlobalActivateCommand() { | 10 GlobalActivateCommand() { |
11 commandParser.addOption( | 11 commandParser.addOption( |
12 "source", | 12 "source", |
13 abbr: "s", | 13 abbr: "s", |
14 help: "The source used to find the package.", | 14 help: "The source used to find the package.", |
15 allowed: ["git", "hosted", "path"], | 15 allowed: ["git", "hosted", "path"], |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 var path = readArg("No package to activate given."); | 80 var path = readArg("No package to activate given."); |
81 validateNoExtraArgs(); | 81 validateNoExtraArgs(); |
82 return globals.activatePath( | 82 return globals.activatePath( |
83 path, | 83 path, |
84 executables, | 84 executables, |
85 overwriteBinStubs: overwrite); | 85 overwriteBinStubs: overwrite); |
86 } | 86 } |
87 throw "unreachable"; | 87 throw "unreachable"; |
88 } | 88 } |
89 } | 89 } |
OLD | NEW |