Merge pull request #3112 from zimbatm/fetchTarball-with-chroot

Fix fetchTarball with chroot stores
This commit is contained in:
Eelco Dolstra 2019-10-01 11:33:57 +02:00 committed by GitHub
commit 4e60c5ec65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2089,12 +2089,12 @@ void fetch(EvalState & state, const Pos & pos, Value * * args, Value & v,
if (evalSettings.pureEval && !request.expectedHash) if (evalSettings.pureEval && !request.expectedHash)
throw Error("in pure evaluation mode, '%s' requires a 'sha256' argument", who); throw Error("in pure evaluation mode, '%s' requires a 'sha256' argument", who);
Path res = getDownloader()->downloadCached(state.store, request).path; auto res = getDownloader()->downloadCached(state.store, request);
if (state.allowedPaths) if (state.allowedPaths)
state.allowedPaths->insert(res); state.allowedPaths->insert(res.path);
mkString(v, res, PathSet({res})); mkString(v, res.storePath, PathSet({res.storePath}));
} }