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

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

Issue 365993007: Support "pub downgrade". (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 5 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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.get; 5 library pub.command.get;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import '../command.dart'; 9 import '../command.dart';
10 import '../solver/version_solver.dart';
10 11
11 /// Handles the `get` pub command. 12 /// Handles the `get` pub command.
12 class GetCommand extends PubCommand { 13 class GetCommand extends PubCommand {
13 String get description => "Get the current package's dependencies."; 14 String get description => "Get the current package's dependencies.";
14 String get usage => "pub get"; 15 String get usage => "pub get";
15 String get docUrl => "http://dartlang.org/tools/pub/cmd/pub-get.html"; 16 String get docUrl => "http://dartlang.org/tools/pub/cmd/pub-get.html";
16 List<String> get aliases => const ["install"]; 17 List<String> get aliases => const ["install"];
17 bool get isOffline => commandOptions["offline"]; 18 bool get isOffline => commandOptions["offline"];
18 19
19 GetCommand() { 20 GetCommand() {
20 commandParser.addFlag('offline', 21 commandParser.addFlag('offline',
21 help: 'Use cached packages instead of accessing the network.'); 22 help: 'Use cached packages instead of accessing the network.');
22 23
23 commandParser.addFlag('dry-run', abbr: 'n', negatable: false, 24 commandParser.addFlag('dry-run', abbr: 'n', negatable: false,
24 help: "Report what dependencies would change but don't change any."); 25 help: "Report what dependencies would change but don't change any.");
25 } 26 }
26 27
27 Future onRun() { 28 Future onRun() {
28 return entrypoint.acquireDependencies(dryRun: commandOptions['dry-run']); 29 return entrypoint.acquireDependencies(SolveType.GET,
30 dryRun: commandOptions['dry-run']);
29 } 31 }
30 } 32 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command/downgrade.dart ('k') | sdk/lib/_internal/pub/lib/src/command/global_deactivate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698