Windows, native launcher: sh_binary doesn't have `rlocation`
See original GitHub issueWhen using the native launcher, the .exe launcher created from sh_binary rules doesn’t define rlocation
for the shell script.
Normally rlocation
is defined for shell tests because they all run https://github.com/bazelbuild/bazel/blob/master/tools/test/test-setup.sh which defines and exports this function.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Developers - Windows, native launcher: sh_binary doesn't have ...
When using the native launcher, the .exe launcher created from sh_binary rules doesn't define rlocation for the shell script.
Read more >bazel sh_binary example | The Search Engine You Control
If I build the Android hello world example without the --python_path flag, I get a strange "LAUNCHER ERROR" message. The reason is that...
Read more >src/BUILD - bazel - Git at Google
TODO(philwo): Clean this up, once a Bazel that can run py_binary and sh_binary. # in Starlark rules on Windows has been released. [filegroup(....
Read more >Windows 11 - Unable to update the Minecraft Native Launcher
I am trying to install the Minecraft Launcher on my Windows 11 PC. Every time, I reach the Minecraft Updater, it gets about...
Read more >Fix "Unable to Update the Minecraft Native Launcher" - YouTube
Updated Minecraft to the Microsoft Store Minecraft Launcher, but can't start it up now due to an "Unable to Update the Minecraft Native...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Actually, I like your idea more than my own! Let me accommodate that in my CL.
I’m closing this bug as obsolete.
The sh_binary on non-Windows uses no launcher, so there’s nothing to load whatever defines
rlocation
. If users want to write platform-independent sh_* rules, they’ll need to source the rlocation-defining library manually (copy-pasting the code to do so from the runfiles library itself).Automatically sourcing the file on Windows encourages writing non-portable Bash scripts, and is unnecessary if the scripts will have the copy-pasted initializer code anyway.