stdenv substitute: fail on non-existant input file

fixes #9744
This commit is contained in:
Robin Gloster
2016-08-01 07:33:39 +00:00
parent c8a7e0b540
commit b6c204f088

View File

@@ -389,6 +389,11 @@ substitute() {
local input="$1"
local output="$2"
if [ ! -f "$input" ]; then
echo "substitute: File \"$input\" does not exist"
return 1
fi
local -a params=("$@")
local n p pattern replacement varName content