fix: Unset environment variables on test run

main
Sean McBride 4 years ago
parent a5b5e0f29a
commit ec935601cb

@ -297,6 +297,16 @@ __framework_sh__load_env_file() {
fi
}
__framework_sh__unset_env_file() {
local envfile="$1"
if [[ -f "$envfile" ]]; then
while read -r line; do
echo unset "${line//=*/}"
unset "${line//=*/}"
done < "$envfile"
fi
}
__framework_sh__run_both() {
local short_name
for envfile in "$__framework_sh__application_directory"/*.env; do
@ -321,6 +331,8 @@ __framework_sh__run_both() {
return 1
}
__framework_sh__unset_env_file "$envfile"
done
return 0

Loading…
Cancel
Save