fi
echo "! $WVCALLER_FILE:$WVCALLER_LINE $TEXT $OK" >&2
if [ "$CODE" -ne 0 ]; then
- exit $CODE
+ return $CODE
else
return 0
fi
fi
}
+# Use WVPASSSH instead of WVPASS when the command includes pipe or
+# output redirection. The whole command must be one argument - quote
+# it.
+WVPASSSH()
+{
+ TEXT="$1"
+
+ _wvfind_caller
+ if bash -o pipefail -c "$@"; then
+ _wvcheck 0 "$TEXT"
+ return 0
+ else
+ _wvcheck 1 "$TEXT"
+ # NOTREACHED
+ return 1
+ fi
+}
WVFAIL()
{
WV_BASE_DIR="$PWD"
export NOVABOOT_TEST=1
export NOVABOOT_CONFIG_DIR=/dev/null # Do not read config from /etc/novaboot.d
+export XDG_CONFIG_HOME=/dev/null # Do not read user config from ~/.config/novaboot
PATH=$(dirname $PWD):$PATH # Find our version of novaboot first