Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Side by Side Diff: sdk/lib/_internal/pub/lib/src/command/global_activate.dart

Issue 602253002: Use pub_semver package in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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.global_activate; 5 library pub.command.global_activate;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:pub_semver/pub_semver.dart';
10
9 import '../command.dart'; 11 import '../command.dart';
10 import '../utils.dart'; 12 import '../utils.dart';
11 import '../version.dart';
12 13
13 /// Handles the `global activate` pub command. 14 /// Handles the `global activate` pub command.
14 class GlobalActivateCommand extends PubCommand { 15 class GlobalActivateCommand extends PubCommand {
15 String get description => "Make a package's executables globally available."; 16 String get description => "Make a package's executables globally available.";
16 String get usage => "pub global activate <package...>"; 17 String get usage => "pub global activate <package...>";
17 bool get takesArguments => true; 18 bool get takesArguments => true;
18 19
19 GlobalActivateCommand() { 20 GlobalActivateCommand() {
20 commandParser.addOption("source", 21 commandParser.addOption("source",
21 abbr: "s", 22 abbr: "s",
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 case "path": 94 case "path":
94 var path = readArg("No package to activate given."); 95 var path = readArg("No package to activate given.");
95 validateNoExtraArgs(); 96 validateNoExtraArgs();
96 return globals.activatePath(path, executables, 97 return globals.activatePath(path, executables,
97 overwriteBinStubs: overwrite); 98 overwriteBinStubs: overwrite);
98 } 99 }
99 100
100 throw "unreachable"; 101 throw "unreachable";
101 } 102 }
102 } 103 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command/cache_add.dart ('k') | sdk/lib/_internal/pub/lib/src/global_packages.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698