aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers/git.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-11-10 23:22:45 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-11-10 23:22:45 +0100
commit4badb6943f73e3d740d4de793eb9860e26842bc1 (patch)
treece890bd8be3c862f42b4755e7d85981ea645dce2 /src/libfetchers/git.cc
parentcdc840d60be6a9082de6d2a845d393e0fb2f1475 (diff)
Fix use of dirty Git/Mercurial inputs with chroot stores
Fixes: $ nix build --store /tmp/nix /home/eelco/Dev/patchelf#hydraJobs.build.x86_64-linux warning: Git tree '/home/eelco/Dev/patchelf' is dirty error: --- RestrictedPathError ------------------------------------------------------------------------------------------- nix access to path '/tmp/nix/nix/store/xmkvfmffk7xfnazykb5kx999aika8an4-source/flake.nix' is forbidden in restricted mode (use '--show-trace' to show detailed location information)
Diffstat (limited to 'src/libfetchers/git.cc')
-rw-r--r--src/libfetchers/git.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libfetchers/git.cc b/src/libfetchers/git.cc
index a6411b02b..e7712c5fd 100644
--- a/src/libfetchers/git.cc
+++ b/src/libfetchers/git.cc
@@ -273,7 +273,7 @@ struct GitInputScheme : InputScheme
haveCommits ? std::stoull(runProgram("git", true, { "-C", actualUrl, "log", "-1", "--format=%ct", "--no-show-signature", "HEAD" })) : 0);
return {
- Tree(store->printStorePath(storePath), std::move(storePath)),
+ Tree(store->toRealPath(storePath), std::move(storePath)),
input
};
}