1
0
Fork 0
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:
Robert Hensing 2022-02-27 15:25:22 +01:00
parent 1c985428c4
commit 158280d8e9
3 changed files with 32 additions and 4 deletions

View file

@ -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