Skip to content

Commit 25af30a

Browse files
committed
Fix setting USE_BAZEL_VERSION in /etc/profile.d
bazel completions are generated for the bazel version specified with `.bazelversion`. But USE_BAZEL_VERSION was not updated accordingly. This resulted in the wrong bazel version being used and completions not working. Fixes #48
1 parent 2ac6474 commit 25af30a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/s-core-devcontainer/.devcontainer/s-core-local/install_matching_bazel_version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ if [ -f .bazelversion ] && [ "$(cat .bazelversion)" != "$(bazel version | grep '
66
USE_BAZEL_VERSION=$(cat .bazelversion)
77
bazel help completion > /tmp/bazel-complete.bash
88
sudo mv /tmp/bazel-complete.bash /etc/bash_completion.d/bazel-complete.bash
9-
sudo sed -i '/^USE_BAZEL_VERSION=/c\USE_BAZEL_VERSION=${USE_BAZEL_VERSION}' /etc/profile.d/bazel.sh || true
9+
echo "export USE_BAZEL_VERSION=$USE_BAZEL_VERSION" | sudo tee /etc/profile.d/bazel.sh
1010
fi

0 commit comments

Comments
 (0)