mirror of
https://github.com/tests-always-included/mo.git
synced 2025-11-19 23:34:32 +01:00
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:
1
tests/fail-not-set-file.expected
Normal file
1
tests/fail-not-set-file.expected
Normal file
@@ -0,0 +1 @@
|
||||
Env variable not set: __NO_SUCH_VAR
|
||||
9
tests/fail-not-set-file.sh
Executable file
9
tests/fail-not-set-file.sh
Executable 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
|
||||
1
tests/fail-not-set-file.template
Normal file
1
tests/fail-not-set-file.template
Normal file
@@ -0,0 +1 @@
|
||||
* {{__NO_SUCH_VAR}}
|
||||
Reference in New Issue
Block a user