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

Unified Diff: lib/src/command/global_run.dart

Issue 1272813003: Support "--checked" in pub run and global run. (Closed) Base URL: https://github.com/dart-lang/pub.git@master
Patch Set: Revise. Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/src/command/run.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/command/global_run.dart
diff --git a/lib/src/command/global_run.dart b/lib/src/command/global_run.dart
index 7fc07a7aa5792794506057705746ac7e8bb946c2..ce0085cbfd9dbcf030c2a0bfa1edc4c5a0b1bfaf 100644
--- a/lib/src/command/global_run.dart
+++ b/lib/src/command/global_run.dart
@@ -26,6 +26,8 @@ class GlobalRunCommand extends PubCommand {
BarbackMode get mode => new BarbackMode(argResults["mode"]);
GlobalRunCommand() {
+ argParser.addFlag("checked", abbr: "c",
+ help: "Enable runtime type checks and assertions.");
argParser.addOption("mode", defaultsTo: "release",
help: 'Mode to run transformers in.');
}
@@ -48,14 +50,12 @@ class GlobalRunCommand extends PubCommand {
var args = argResults.rest.skip(1).toList();
if (p.split(executable).length > 1) {
- // TODO(nweiz): Use adjacent strings when the new async/await compiler
- // lands.
- usageException('Cannot run an executable in a subdirectory of a global ' +
+ usageException('Cannot run an executable in a subdirectory of a global '
'package.');
}
var exitCode = await globals.runExecutable(package, executable, args,
- mode: mode);
+ checked: argResults["checked"], mode: mode);
await flushThenExit(exitCode);
}
}
« no previous file with comments | « no previous file | lib/src/command/run.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698