mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-26 17:43:09 +02:00
modulecmd: bugfix in removing tmp file in _exit
This commit is contained in:
@@ -143,7 +143,9 @@ save_env() {
|
||||
|
||||
_exit() {
|
||||
save_env "${g_env_must_be_saved}"
|
||||
${rm} -f "${tmpfile}"
|
||||
if [[ -n "${tmpfile}" ]] && [[ -e "${tmpfile}" ]]; then
|
||||
${rm} -f "${tmpfile}" || :
|
||||
fi
|
||||
}
|
||||
|
||||
trap '_exit' EXIT
|
||||
|
||||
Reference in New Issue
Block a user