Skip to content

Commit

Permalink
chore(bazel): Disable the wrapper script only for the --version call
Browse files Browse the repository at this point in the history
The wrapper script can be relevant by defining e.g. a specific '.bazelrc'
depending on the value of an environment variable.
This is a fixup for 310470d.

Signed-off-by: Nicolas Nobelis <nicolas.nobelis@bosch.com>
  • Loading branch information
nnobelis committed Oct 7, 2024
1 parent 9705928 commit e615986
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/package-managers/bazel/src/main/kotlin/Bazel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ class Bazel(
super.run(
args = args,
workingDir = workingDir,
// Disable the optional wrapper script under `tools/bazel`, to ensure the --version option works.
// Disable the optional wrapper script under `tools/bazel` only for the "--version" call.
environment = environment + mapOf(
"BAZELISK_SKIP_WRAPPER" to "true",
"BAZELISK_SKIP_WRAPPER" to "${args[0] == getVersionArguments()}",
"USE_BAZEL_FALLBACK_VERSION" to BAZEL_FALLBACK_VERSION
)
)
Expand Down

0 comments on commit e615986

Please sign in to comment.