mirror of
https://github.com/NixOS/nix
synced 2025-07-08 15:13:55 +02:00
fetchTree: Do not re-fetch paths already present
This commit is contained in:
parent
1c985428c4
commit
158280d8e9
3 changed files with 32 additions and 4 deletions
|
@ -9,6 +9,10 @@ outPath=$(nix-build -vvvvv --expr 'import <nix/fetchurl.nix>' --argstr url file:
|
|||
|
||||
cmp $outPath fetchurl.sh
|
||||
|
||||
# Do not re-fetch paths already present.
|
||||
outPath2=$(nix-build -vvvvv --expr 'import <nix/fetchurl.nix>' --argstr url file:///does-not-exist/must-remain-unused/fetchurl.sh --argstr sha256 $hash --no-out-link)
|
||||
test "$outPath" == "$outPath2"
|
||||
|
||||
# Now using a base-64 hash.
|
||||
clearStore
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue