Skip to content

Commit

Permalink
Do the same for set +e/-e
Browse files Browse the repository at this point in the history
  • Loading branch information
danielabdi-noaa committed Oct 10, 2022
1 parent 3dc5cd1 commit 15986db
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions etc/lmod-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ else
fi

[[ ${SHELLOPTS} =~ nounset ]] && has_mu=true || has_mu=false
[[ ${SHELLOPTS} =~ errexit ]] && has_me=true || has_me=false
$has_mu && set +u
$has_me && set +e
source /etc/profile
$has_mu && set -u
$has_me && set -e

if [ "$L_MACHINE" = macos ]; then
export BASH_ENV="/opt/homebrew/opt/lmod/init/bash"
Expand Down

0 comments on commit 15986db

Please sign in to comment.