| 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());
|
|
|