* Don't rely on /dev/stdin.

This commit is contained in:
Eelco Dolstra 2007-08-10 00:22:21 +00:00
parent c5e934dcc9
commit 5e52df18fe
1 changed files with 2 additions and 1 deletions

View File

@ -56,7 +56,8 @@ if test -z "$finalPath"; then
# the file *contents* is done in Nix store, where it can be
# garbage-collected independently.
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"
cachedHashFN="$NIX_DOWNLOAD_CACHE/$urlHash.$hashType"
cachedTimestampFN="$NIX_DOWNLOAD_CACHE/$urlHash.stamp"