bazelisk icon indicating copy to clipboard operation
bazelisk copied to clipboard

Allow overriding tools/bazel path with BAZELISK_WRAPPER_PATH

Open keith opened this issue 1 year ago • 6 comments

In some projects the tools/bazel path isn't practical. This allows users to override this path with the BAZELISK_WRAPPER_PATH env var / .bazeliskrc config option.

keith avatar Apr 02 '24 15:04 keith

+1 we'd love this primarily to fix #577

luispadron avatar May 13 '24 20:05 luispadron

@fweikert ptal

keith avatar May 13 '24 20:05 keith

One downside with this is that scripts that recursively call into bazel might break now. They would work before because the tools directory is added to PATH. If this allowed specifying the parent directory of the wrapper, but the wrapper had to be called bazel, then that use case would continue to work.

brentleyjones avatar May 13 '24 21:05 brentleyjones

yea i guess that's up to the user to manage if they rely on that. we could alternatively just allow a different directory vs different file name, since I imagine that's the more common thing that's important to override.

keith avatar May 13 '24 21:05 keith

I'd be happy with different directory if it helps with the issue Brentley mentioned

luispadron avatar May 13 '24 21:05 luispadron

It wouldn't entirely be in control of the user though, because the scripts I'm talking about are run targets, like rules_xcodeproj's project generation.

So I would prefer to limit it to the directory if possible.

brentleyjones avatar May 14 '24 00:05 brentleyjones

updated

keith avatar May 14 '24 16:05 keith

Thank you!

fweikert avatar May 14 '24 18:05 fweikert

thanks!

keith avatar May 14 '24 18:05 keith