aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-07-09 19:07:06 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-07-09 19:07:06 +0000
commit323d51a7a05d81c717d8e8673a78b07500a591fe (patch)
tree7f211f4b87ac11e129b865cd4d187608df1f7a1f /src/libstore/build.cc
parent0f05a36e205a1d04a0ed6d6cdcd0e3e225f73f05 (diff)
parenta2c27022e9afc394e08d34d349587c8903fc1a97 (diff)
Merge branch 'master' of github.com:NixOS/nix into better-ca-parse-errors
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index a57055168..6970363b0 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -2041,7 +2041,10 @@ void DerivationGoal::startBuilder()
if (!std::regex_match(fileName, regex))
throw Error("invalid file name '%s' in 'exportReferencesGraph'", fileName);
- auto storePath = worker.store.parseStorePath(*i++);
+ auto storePathS = *i++;
+ if (!worker.store.isInStore(storePathS))
+ throw BuildError("'exportReferencesGraph' contains a non-store path '%1%'", storePathS);
+ auto storePath = worker.store.parseStorePath(worker.store.toStorePath(storePathS));
/* Write closure info to <fileName>. */
writeFile(tmpDir + "/" + fileName,