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

Unified Diff: sdk/lib/_internal/pub/lib/src/command/global_run.dart

Issue 475093003: Precompile immutable globally-installed pub executables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 6 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: sdk/lib/_internal/pub/lib/src/command/global_run.dart
diff --git a/sdk/lib/_internal/pub/lib/src/command/global_run.dart b/sdk/lib/_internal/pub/lib/src/command/global_run.dart
index d0f35ba70af58aaaf3b117f71c3343d1fc34ecc5..e9746ccdd2892c05f67eced168514641e751c498 100644
--- a/sdk/lib/_internal/pub/lib/src/command/global_run.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/global_run.dart
@@ -6,8 +6,9 @@ library pub.command.global_run;
import 'dart:async';
+import 'package:path/path.dart' as p;
+
import '../command.dart';
-import '../executable.dart';
import '../io.dart';
import '../utils.dart';
@@ -37,10 +38,11 @@ class GlobalRunCommand extends PubCommand {
}
var args = commandOptions.rest.skip(1).toList();
+ if (p.split(executable).length > 1) {
+ usageError('Cannot run an executable in a subdirectory of a global '
+ 'package.');
+ }
- return globals.find(package).then((entrypoint) {
- return runExecutable(this, entrypoint, package, executable, args,
- isGlobal: true);
- }).then(flushThenExit);
+ return globals.runExecutable(package, executable, args).then(flushThenExit);
}
}
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart ('k') | sdk/lib/_internal/pub/lib/src/command/run.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698