diff --git a/lib/libem.bash b/lib/libem.bash index 475e24c..26a37f3 100644 --- a/lib/libem.bash +++ b/lib/libem.bash @@ -152,7 +152,9 @@ declare -x LIBRARY_PATH declare -x LD_LIBRARY_PATH declare -x DYLD_LIBRARY_PATH -module purge +if typeset -f module > /dev/null 2>&1 ; then + module purge +fi if [[ $DEBUG_ON ]]; then trap 'echo "$BASH_COMMAND"' DEBUG