Making --fail-not-set work with partials

The return code was not propagated through nested subshells in case
when files were passed in as arguments.
This commit is contained in:
Alexey Maslennikov
2017-06-15 21:47:12 +02:00
parent 50aa18e2a6
commit 2b611b8f90
4 changed files with 16 additions and 4 deletions

View File

@@ -0,0 +1 @@
Env variable not set: __NO_SUCH_VAR

9
tests/fail-not-set-file.sh Executable file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
cd "${0%/*}"
unset __NO_SUCH_VAR
../mo --fail-not-set ./fail-not-set-file.template 2>&1
if [[ $? -ne 1 ]]; then
echo "Did not return 1"
fi

View File

@@ -0,0 +1 @@
* {{__NO_SUCH_VAR}}