Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only unset xtrace if env.sh set it first #5875

Merged
merged 2 commits into from
Jun 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,22 @@
#
# See also: ./.envrc

OLD_SHELL_OPTS=$-
set -o xtrace
OMICRON_WS="$(readlink -f $(dirname "${BASH_SOURCE[0]}"))"

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"
unset OMICRON_WS
set +o xtrace

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