From 6438ba22af57edc054e441053a7c3cd5d48e5597 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 14 Jul 2017 14:23:38 +0200 Subject: StorePathsCommand: Don't build installables On second though this was annoying. E.g. "nix log nixpkgs.hello" would build/download Hello first, even though the log can be fetched directly from the binary cache. May need to revisit this. --- src/nix/installables.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/nix/installables.cc') diff --git a/src/nix/installables.cc b/src/nix/installables.cc index 9982ff75f..f0d5d547c 100644 --- a/src/nix/installables.cc +++ b/src/nix/installables.cc @@ -214,7 +214,7 @@ std::vector> InstallablesCommand::parseInstallables return result; } -PathSet InstallablesCommand::buildInstallables(ref store, bool dryRun) +PathSet InstallablesCommand::toStorePaths(ref store, ToStorePathsMode mode) { PathSet buildables; @@ -223,9 +223,9 @@ PathSet InstallablesCommand::buildInstallables(ref store, bool dryRun) buildables.insert(b.begin(), b.end()); } - if (dryRun) + if (mode == DryRun) printMissing(store, buildables); - else + else if (mode == Build) store->buildPaths(buildables); PathSet outPaths; -- cgit v1.2.3