Index: sdk/lib/_internal/pub/lib/src/command_install.dart |
diff --git a/sdk/lib/_internal/pub/lib/src/command_install.dart b/sdk/lib/_internal/pub/lib/src/command_install.dart |
index d51b553250bf101619744997cd5d29a2f8769102..a57886f8d8e778e5a246b6150200e45a104ee3c5 100644 |
--- a/sdk/lib/_internal/pub/lib/src/command_install.dart |
+++ b/sdk/lib/_internal/pub/lib/src/command_install.dart |
@@ -6,6 +6,8 @@ library command_install; |
import 'dart:async'; |
+import 'package:args/args.dart'; |
+ |
import 'command.dart'; |
import 'entrypoint.dart'; |
import 'log.dart' as log; |
@@ -15,6 +17,14 @@ class InstallCommand extends PubCommand { |
String get description => "Install the current package's dependencies."; |
String get usage => "pub install"; |
+ ArgParser get commandParser { |
+ return new ArgParser() |
+ ..addFlag('offline', |
+ help: 'Use cached packages instead of accessing the network.'); |
+ } |
+ |
+ bool get isOffline => commandOptions['offline']; |
+ |
Future onRun() { |
return entrypoint.installDependencies() |
.then((_) => log.message("Dependencies installed!")); |