Skip to content

[7.0.0] Fix Bash runfiles calling repository lookup for directly run scripts#19857

Merged
meteorcloudy merged 2 commits intobazelbuild:release-7.0.0from
bazel-io:cp19810-7.0.0
Oct 18, 2023
Merged

[7.0.0] Fix Bash runfiles calling repository lookup for directly run scripts#19857
meteorcloudy merged 2 commits intobazelbuild:release-7.0.0from
bazel-io:cp19810-7.0.0

Conversation

@bazel-io
Copy link
Copy Markdown
Member

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 #19796 (comment)

Closes #19810.

Commit 58ce112

PiperOrigin-RevId: 574208158
Change-Id: I45d6b503e8f34e13177d57ca64c202640306cfb8

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
@bazel-io bazel-io requested a review from a team as a code owner October 17, 2023 22:49
@bazel-io bazel-io added team-Configurability platforms, toolchains, cquery, select(), config transitions awaiting-review PR is awaiting review from an assigned reviewer labels Oct 17, 2023
@bazel-io bazel-io requested a review from meteorcloudy October 17, 2023 22:49
@github-actions github-actions bot removed the team-Configurability platforms, toolchains, cquery, select(), config transitions label Oct 17, 2023
@iancha1992 iancha1992 added the team-Configurability platforms, toolchains, cquery, select(), config transitions label Oct 18, 2023
@meteorcloudy meteorcloudy enabled auto-merge (squash) October 18, 2023 09:37
@meteorcloudy meteorcloudy merged commit da1a6d7 into bazelbuild:release-7.0.0 Oct 18, 2023
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-Configurability platforms, toolchains, cquery, select(), config transitions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants