mirror of
https://github.com/NixOS/nix
synced 2025-06-26 20:01:15 +02:00
downloadCached: Return ETag
This allows fetchFlake() to return the Git revision of a GitHub archive.
This commit is contained in:
parent
6e9182fbc2
commit
529add316c
7 changed files with 64 additions and 26 deletions
|
@ -2112,7 +2112,7 @@ void fetch(EvalState & state, const Pos & pos, Value * * args, Value & v,
|
|||
if (evalSettings.pureEval && !expectedHash)
|
||||
throw Error("in pure evaluation mode, '%s' requires a 'sha256' argument", who);
|
||||
|
||||
Path res = getDownloader()->downloadCached(state.store, url, unpack, name, expectedHash);
|
||||
Path res = getDownloader()->downloadCached(state.store, url, unpack, name, expectedHash).path;
|
||||
|
||||
if (state.allowedPaths)
|
||||
state.allowedPaths->insert(res);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue