diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index ea2ea947b50..e0e9a00a02e 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -569,6 +569,10 @@ patchPhase() { for i in $patches; do header "applying patch $i" 3 + if [ ! -r $i ]; then + echo "file $i does not exist or not readable" + exit 1 + fi local uncompress=cat case $i in *.gz)