Skip to content

Commit

Permalink
ensure set +o xtrace is the last thing we do
Browse files Browse the repository at this point in the history
  • Loading branch information
iliana committed Jun 10, 2024
1 parent 0103862 commit a093b00
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,20 @@

OLD_SHELL_OPTS=$-
set -o xtrace

OMICRON_WS=$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")
export PATH="$OMICRON_WS/out/cockroachdb/bin:$PATH"
export PATH="$OMICRON_WS/out/clickhouse:$PATH"
export PATH="$OMICRON_WS/out/dendrite-stub/bin:$PATH"
export PATH="$OMICRON_WS/out/mgd/root/opt/oxide/mgd/bin:$PATH"

# if xtrace was set previously, do not unset it
case $OLD_SHELL_OPTS in
*x*) ;;
*) set +o xtrace ;;
*x*)
unset OLD_SHELL_OPTS OMICRON_WS
;;
*)
unset OLD_SHELL_OPTS OMICRON_WS
set +o xtrace
;;
esac
unset OLD_SHELL_OPTS OMICRON_WS

0 comments on commit a093b00

Please sign in to comment.