Skip to content

Commit 097ed87

Browse files
committed
Run "pub run" against the .packages file.
This reverts commit 7fbc104, which reverted commit dc626af. [email protected] Review URL: https://codereview.chromium.org//1272903002 .
1 parent b308456 commit 097ed87

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/src/entrypoint.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ class Entrypoint {
7676
/// The path to the entrypoint's "packages" directory.
7777
String get packagesDir => root.path('packages');
7878

79+
/// The path to the entrypoint's ".packages" file.
80+
String get packagesFile => root.path('.packages');
81+
7982
/// `true` if the entrypoint package currently has a lock file.
8083
bool get lockFileExists => _lockFile != null || entryExists(lockFilePath);
8184

lib/src/executable.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Future<int> runExecutable(Entrypoint entrypoint, String package,
120120
// helpful for the subprocess to be able to spawn Dart with
121121
// Platform.executableArguments and have that work regardless of the working
122122
// directory.
123-
vmArgs.add('--package-root=${p.toUri(p.absolute(entrypoint.packagesDir))}');
123+
vmArgs.add('--packages=${p.toUri(p.absolute(entrypoint.packagesFile))}');
124124
}
125125

126126
vmArgs.add(executableUrl.toString());

0 commit comments

Comments
 (0)