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

Unified Diff: lib/src/executable.dart

Issue 1236973002: Pass an absolute package root to the VM. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 5 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/executable.dart
diff --git a/lib/src/executable.dart b/lib/src/executable.dart
index 863f306f672e01c03349298ddf37efffcd3faa6c..62c33a1c6c1499296c65354e5990e7c0bbe735a7 100644
--- a/lib/src/executable.dart
+++ b/lib/src/executable.dart
@@ -115,7 +115,12 @@ Future<int> runExecutable(Entrypoint entrypoint, String package,
// example, it may not have the right packages directory itself.
if (executableUrl.scheme == 'file' || executableUrl.scheme == '') {
// TODO(nweiz): use a .packages file once sdk#23369 is fixed.
- vmArgs.add('--package-root=${p.toUri(entrypoint.packagesDir)}');
+
+ // We use an absolute path here not because the VM insists but because it's
+ // helpful for the subprocess to be able to spawn Dart with
+ // Platform.executableArguments and have that work regardless of the working
+ // directory.
+ vmArgs.add('--package-root=${p.toUri(p.absolute(entrypoint.packagesDir))}');
}
vmArgs.add(executableUrl.toString());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698