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

Unified Diff: lib/src/command/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: 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
Index: lib/src/command/run.dart
diff --git a/lib/src/command/run.dart b/lib/src/command/run.dart
index ad82c7df42c5747494e909e3da32f8138dac8e70..82ad2efeb5222ec4136ade637222b35359ba89bb 100644
--- a/lib/src/command/run.dart
+++ b/lib/src/command/run.dart
@@ -22,6 +22,8 @@ class RunCommand extends PubCommand {
bool get allowTrailingOptions => false;
RunCommand() {
+ argParser.addFlag("checked", abbr: "c", negatable: false,
+ help: "Enable runtime type checks and assertions.");
argParser.addOption("mode",
help: 'Mode to run transformers in.\n'
'(defaults to "release" for dependencies, "debug" for '
@@ -66,7 +68,7 @@ class RunCommand extends PubCommand {
}
var exitCode = await runExecutable(entrypoint, package, executable, args,
- mode: mode);
+ checked: argResults['checked'], mode: mode);
await flushThenExit(exitCode);
}
}

Powered by Google App Engine
This is Rietveld 408576698