Merge pull request #43224 from volth/patch-179
[staging] substitute(): --subst-var was silently coercing to "" if the variable does not exist.
This commit is contained in:
commit
37273afd27
@ -660,6 +660,10 @@ substituteStream() {
|
|||||||
echo "substituteStream(): ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." >&2
|
echo "substituteStream(): ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." >&2
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
if [ -z ${!varName+x} ]; then
|
||||||
|
echo "substituteStream(): ERROR: variable \$$varName is unset" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
pattern="@$varName@"
|
pattern="@$varName@"
|
||||||
replacement="${!varName}"
|
replacement="${!varName}"
|
||||||
;;
|
;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user