* Don't rely on /dev/stdin.
This commit is contained in:
parent
c5e934dcc9
commit
5e52df18fe
1 changed files with 2 additions and 1 deletions
|
@ -56,7 +56,8 @@ if test -z "$finalPath"; then
|
||||||
# the file *contents* is done in Nix store, where it can be
|
# the file *contents* is done in Nix store, where it can be
|
||||||
# garbage-collected independently.
|
# garbage-collected independently.
|
||||||
if test -n "$NIX_DOWNLOAD_CACHE"; then
|
if test -n "$NIX_DOWNLOAD_CACHE"; then
|
||||||
urlHash="$(echo -n "$url" | nix-hash --type sha256 --base32 --flat /dev/stdin)"
|
echo -n "$url" > $tmpPath/url
|
||||||
|
urlHash=$(nix-hash --type sha256 --base32 --flat $tmpPath/url)
|
||||||
echo "$url" > "$NIX_DOWNLOAD_CACHE/$urlHash.url"
|
echo "$url" > "$NIX_DOWNLOAD_CACHE/$urlHash.url"
|
||||||
cachedHashFN="$NIX_DOWNLOAD_CACHE/$urlHash.$hashType"
|
cachedHashFN="$NIX_DOWNLOAD_CACHE/$urlHash.$hashType"
|
||||||
cachedTimestampFN="$NIX_DOWNLOAD_CACHE/$urlHash.stamp"
|
cachedTimestampFN="$NIX_DOWNLOAD_CACHE/$urlHash.stamp"
|
||||||
|
|
Loading…
Reference in a new issue