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

Unified Diff: lib/src/global_packages.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 | « lib/src/executable.dart ('k') | test/global/run/runs_script_in_checked_mode_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/global_packages.dart
diff --git a/lib/src/global_packages.dart b/lib/src/global_packages.dart
index 60eef15afae1be1b1d15ee9c9a263eec31431290..a9ca7d4ff7d7710951486107426ce32b422deaf2 100644
--- a/lib/src/global_packages.dart
+++ b/lib/src/global_packages.dart
@@ -329,12 +329,13 @@ class GlobalPackages {
/// recompiled if the SDK has been upgraded since it was first compiled and
/// then run. Otherwise, it will be run from source.
///
- /// If [mode] is passed, it's used as the barback mode; it defaults to
+ /// If [checked] is true, the program is run in checked mode. If [mode] is
+ /// passed, it's used as the barback mode; it defaults to
/// [BarbackMode.RELEASE].
///
/// Returns the exit code from the executable.
Future<int> runExecutable(String package, String executable,
- Iterable<String> args, {BarbackMode mode}) {
+ Iterable<String> args, {bool checked: false, BarbackMode mode}) {
if (mode == null) mode = BarbackMode.RELEASE;
var binDir = p.join(_directory, package, 'bin');
@@ -342,7 +343,7 @@ class GlobalPackages {
!fileExists(p.join(binDir, '$executable.dart.snapshot'))) {
return find(package).then((entrypoint) {
return exe.runExecutable(entrypoint, package, executable, args,
- mode: mode, isGlobal: true);
+ isGlobal: true, checked: checked, mode: mode);
});
}
@@ -353,7 +354,7 @@ class GlobalPackages {
}
var snapshotPath = p.join(binDir, '$executable.dart.snapshot');
- return exe.runSnapshot(snapshotPath, args, recompile: () {
+ return exe.runSnapshot(snapshotPath, args, checked: checked, recompile: () {
log.fine("$package:$executable is out of date and needs to be "
"recompiled.");
return find(package)
« no previous file with comments | « lib/src/executable.dart ('k') | test/global/run/runs_script_in_checked_mode_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698