File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
src/s-core-devcontainer/.devcontainer/s-core-local Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ rm /tmp/bazelisk.deb
5757
5858# Pre-install a fixed Bazel version, setup the bash command completion
5959export USE_BAZEL_VERSION=${bazel_version}
60- bazel help completion > /tmp/bazel-complete.bash
60+ bazel help completion bash > /tmp/bazel-complete.bash
6161ls -lah /tmp/bazel-complete.bash
6262mkdir -p /etc/bash_completion.d
6363mv /tmp/bazel-complete.bash /etc/bash_completion.d/bazel-complete.bash
Original file line number Diff line number Diff line change @@ -6,7 +6,14 @@ set -eo pipefail
66if [ -f .bazelversion ] && [ " $( cat .bazelversion) " != " $INSTALLED_BAZEL_VERSION " ]; then
77 # Pre-install the matching Bazel version, setup the bash command completion
88 USE_BAZEL_VERSION=$( cat .bazelversion)
9- bazel help completion > /tmp/bazel-complete.bash
9+
10+ min_bazel_version_for_bash_option=" 8.4.0"
11+ bash=" "
12+ if [ " $( printf ' %s\n' " $min_bazel_version_for_bash_option " " $USE_BAZEL_VERSION " | sort -V | head -n1) " = " $min_bazel_version_for_bash_option " ]; then
13+ bash=" bash"
14+ fi
15+
16+ bazel help completion ${bash} > /tmp/bazel-complete.bash
1017 sudo mv /tmp/bazel-complete.bash /etc/bash_completion.d/bazel-complete.bash
11- echo " export INSTALLED_BAZEL_VERSION=$USE_BAZEL_VERSION " | sudo tee /devcontainer/features/s-core-local/bazel_setup.sh
18+ echo " INSTALLED_BAZEL_VERSION=$USE_BAZEL_VERSION " | sudo tee /devcontainer/features/s-core-local/bazel_setup.sh
1219fi
You can’t perform that action at this time.
0 commit comments