Skip to content

Commit

Permalink
Scripts: stop environment.sh from making -e scripts exit when sourced.
Browse files Browse the repository at this point in the history
  • Loading branch information
miklschmidt committed Dec 21, 2024
1 parent 92c29b3 commit 141d578
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions configuration/scripts/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,9 @@ if [ ! -f "$envFile" ] && [ ! -f "$userEnvFile" ] ; then
echo "Fatal Error: Unable to load RatOS environment, neither $envFile nor $userEnvFile found, exiting..." >&2
exit 1
fi
[ -f "$envFile" ] && load_env "$envFile"
[ "$EUID" -ne 0 ] && [ -f "$userEnvFile" ] && load_env "$userEnvFile"
if [ -f "$envFile" ]; then
load_env "$envFile"
fi
if [ "$EUID" -ne 0 ] && [ -f "$userEnvFile" ]; then
load_env "$userEnvFile"
fi

0 comments on commit 141d578

Please sign in to comment.