diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-07-28T13·03+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-07-28T13·17+0200 |
commit | c7654bc491d9ce7c1fbadecd7769418fa79a2060 (patch) | |
tree | c7bb8b932184c8dee2b4909fe5836d6e21284798 /src/nix-build/nix-build.cc | |
parent | af4689f9e9c846f8b8d902b05cabad88427d46b6 (diff) |
nix-build: Fix regression causing all outputs to be built
Diffstat (limited to 'src/nix-build/nix-build.cc')
-rwxr-xr-x | src/nix-build/nix-build.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index 8a3c8a02506c..769ca8cd03a2 100755 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -453,13 +453,13 @@ void mainWrapped(int argc, char * * argv) for (auto & drvInfo : drvs) { auto drvPath = drvInfo.queryDrvPath(); - pathsToBuild.insert(drvPath); + auto outPath = drvInfo.queryOutPath(); auto outputName = drvInfo.queryOutputName(); if (outputName == "") throw Error("derivation ‘%s’ lacks an ‘outputName’ attribute", drvPath); - pathsToBuild.insert(drvPath + (outputName != "out" ? "!" + outputName : "")); + pathsToBuild.insert(drvPath + "!" + outputName); std::string drvPrefix; auto i = drvPrefixes.find(drvPath); @@ -475,8 +475,8 @@ void mainWrapped(int argc, char * * argv) std::string symlink = drvPrefix; if (outputName != "out") symlink += "-" + outputName; - resultSymlinks[symlink] = drvInfo.queryOutPath(); - outPaths.push_back(drvInfo.queryOutPath()); + resultSymlinks[symlink] = outPath; + outPaths.push_back(outPath); } buildPaths(pathsToBuild); |