Skip to content

Commit

Permalink
Return back to working directory after installing Bazel version
Browse files Browse the repository at this point in the history
Nit: Add `cd -`  to return back to `$OLDPWD` after following the suggestion to install the required Bazel version. That way developers don't have to cd back to their project

Closes #24995.

PiperOrigin-RevId: 718263777
Change-Id: I5133db65dc2b9032a9e631c62966314f3cfb4593
  • Loading branch information
ssaradp authored and copybara-github committed Jan 22, 2025
1 parent 5c0d56d commit d650121
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/packages/bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,11 @@ if [[ ! -x $BAZEL_REAL ]]; then
if [[ -x $(command -v curl) && -w $wrapper_dir ]]; then
(echo ""
echo "You can download the required version directly using this command:"
echo " (cd \"${wrapper_dir}\" && curl -fLO https://releases.bazel.build/${bazel_version}/release/${long_binary_name} && chmod +x ${long_binary_name})") 2>&1
echo " (cd \"${wrapper_dir}\" && curl -fLO https://releases.bazel.build/${bazel_version}/release/${long_binary_name} && chmod +x ${long_binary_name} && cd - )") 2>&1
elif [[ -x $(command -v wget) && -w $wrapper_dir ]]; then
(echo ""
echo "You can download the required version directly using this command:"
echo " (cd \"${wrapper_dir}\" && wget https://releases.bazel.build/${bazel_version}/release/${long_binary_name} && chmod +x ${long_binary_name})") 2>&1
echo " (cd \"${wrapper_dir}\" && wget https://releases.bazel.build/${bazel_version}/release/${long_binary_name} && chmod +x ${long_binary_name} && cd - )") 2>&1
else
(echo ""
echo "Please put the downloaded Bazel binary into this location:"
Expand Down

0 comments on commit d650121

Please sign in to comment.