microsoft / vscode-dev-containers

NOTE: Most of the contents of this repository have been migrated to the new devcontainers GitHub org (https://github.com/devcontainers). See https://github.com/devcontainers/template-starter and https://github.com/devcontainers/feature-starter for information on creating your own!
https://aka.ms/vscode-remote
MIT License
4.72k stars 1.4k forks source link

refactor: download bazelisk to /usr/local/bin/bazel #1507

Open Aghassi opened 2 years ago

Aghassi commented 2 years ago

The original implementation of this links bazelisk to /user/local/bin/bazelisk, but that means a user would have to type bazelisk to have it install bazel. The more natural way for a user to interact in a bazel project is just to run bazel. If bazelisk is linked to the bazel path it will automatically fetch bazel for the end user and not have to worry about different commands.

Here is an ergonmic example of what I expect as an end user when I start a space using this file

@Aghassi ➜ /workspaces/bazel-lib (vscodepsaces/dockerfile ✗) $ which bazel
/usr/local/bin/bazel
@Aghassi ➜ /workspaces/bazel-lib (vscodepsaces/dockerfile ✗) $ bazel
2022/06/18 19:05:05 Downloading https://releases.bazel.build/5.0.0/rolling/5.0.0-pre.20211011.2/bazel-5.0.0-pre.20211011.2-linux-x86_64...
Extracting Bazel installation...