mirror of
https://github.com/NixOS/nix
synced 2025-06-27 08:31:16 +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
|
@ -46,7 +46,7 @@ Bindings * MixEvalArgs::getAutoArgs(EvalState & state)
|
|||
Path lookupFileArg(EvalState & state, string s)
|
||||
{
|
||||
if (isUri(s))
|
||||
return getDownloader()->downloadCached(state.store, s, true);
|
||||
return getDownloader()->downloadCached(state.store, s, true).path;
|
||||
else if (s.size() > 2 && s.at(0) == '<' && s.at(s.size() - 1) == '>') {
|
||||
Path p = s.substr(1, s.size() - 2);
|
||||
return state.findFile(p);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue