[7.0.0] Fix Bash runfiles calling repository lookup for directly run scripts#19857
Merged
meteorcloudy merged 2 commits intobazelbuild:release-7.0.0from Oct 18, 2023
Merged
Conversation
When an `sh_binary` is run directly from `bazel-bin`, its path won't be contained in the manifest and will not match a `bazel-out` regex. Instead, make the path absolute and then match after the `bazel-bin` to extract the binaries repository name. Also improve the error message when `runfiles_current_repository` can find neither the runfiles manifest nor the runfiles directory. Work towards fixing bazelbuild#19796 (comment) Closes bazelbuild#19810. PiperOrigin-RevId: 574208158 Change-Id: I45d6b503e8f34e13177d57ca64c202640306cfb8
meteorcloudy
approved these changes
Oct 18, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When an
sh_binaryis run directly frombazel-bin, its path won't be contained in the manifest and will not match abazel-outregex. Instead, make the path absolute and then match after thebazel-binto extract the binaries repository name.Also improve the error message when
runfiles_current_repositorycan find neither the runfiles manifest nor the runfiles directory.Work towards fixing #19796 (comment)
Closes #19810.
Commit 58ce112
PiperOrigin-RevId: 574208158
Change-Id: I45d6b503e8f34e13177d57ca64c202640306cfb8