From 097ed875ea36b5406dce7c441f4feda1181f7664 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum <nweiz@google.com> Date: Wed, 5 Aug 2015 17:08:45 -0700 Subject: [PATCH] Run "pub run" against the .packages file. This reverts commit 7fbc104018cdac3d50067392754101526f78dde6, which reverted commit dc626af36a4b31898cdde90b2fca99ad65639fab. R=rnystrom@google.com Review URL: https://codereview.chromium.org//1272903002 . --- lib/src/entrypoint.dart | 3 +++ lib/src/executable.dart | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/src/entrypoint.dart b/lib/src/entrypoint.dart index ceb27790..8e8b7921 100644 --- a/lib/src/entrypoint.dart +++ b/lib/src/entrypoint.dart @@ -76,6 +76,9 @@ class Entrypoint { /// The path to the entrypoint's "packages" directory. String get packagesDir => root.path('packages'); + /// The path to the entrypoint's ".packages" file. + String get packagesFile => root.path('.packages'); + /// `true` if the entrypoint package currently has a lock file. bool get lockFileExists => _lockFile != null || entryExists(lockFilePath); diff --git a/lib/src/executable.dart b/lib/src/executable.dart index 62c33a1c..ec37cef2 100644 --- a/lib/src/executable.dart +++ b/lib/src/executable.dart @@ -120,7 +120,7 @@ Future<int> runExecutable(Entrypoint entrypoint, String package, // 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('--packages=${p.toUri(p.absolute(entrypoint.packagesFile))}'); } vmArgs.add(executableUrl.toString()); -- GitLab