[Tests] ensure `nvm unload` unsets env vars too
parent
a1ad32e9cb
commit
f4eddb2c9c
|
@ -9,6 +9,7 @@ cleanup () { rm -f "${BEFORE}" "${AFTER}"; }
|
||||||
die () { echo "$@" ; cleanup ; exit 1; }
|
die () { echo "$@" ; cleanup ; exit 1; }
|
||||||
|
|
||||||
typeset -f | awk '/ \(\) $/ && !/^main / {print $1}' > "${BEFORE}"
|
typeset -f | awk '/ \(\) $/ && !/^main / {print $1}' > "${BEFORE}"
|
||||||
|
env | grep -v PATH= | grep -v NVM_ >> "${BEFORE}"
|
||||||
|
|
||||||
set +e # TODO: fix
|
set +e # TODO: fix
|
||||||
\. ../../nvm.sh
|
\. ../../nvm.sh
|
||||||
|
@ -19,6 +20,7 @@ type nvm > /dev/null 2>&1 || die "nvm not loaded"
|
||||||
nvm unload
|
nvm unload
|
||||||
|
|
||||||
typeset -f | awk '/ \(\) $/ && !/^main / {print $1}' > "${AFTER}"
|
typeset -f | awk '/ \(\) $/ && !/^main / {print $1}' > "${AFTER}"
|
||||||
|
env | grep -v PATH= >> "${AFTER}"
|
||||||
|
|
||||||
! type nvm > /dev/null 2>&1 || die "nvm not unloaded"
|
! type nvm > /dev/null 2>&1 || die "nvm not unloaded"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue