Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: pkgutil not found with sanitized repo_env PATH #80

Open
pyrocat101 opened this issue Sep 9, 2024 · 0 comments · May be fixed by #81
Open

[Bug]: pkgutil not found with sanitized repo_env PATH #80

pyrocat101 opened this issue Sep 9, 2024 · 0 comments · May be fixed by #81
Assignees
Labels
bug Something isn't working

Comments

@pyrocat101
Copy link

What happened?

With a custom --repo_env=PATH=... in the bazelrc, rules_aws will fail to find pkgutil and thus failed to install the CLI.

Version

rules_aws 0.4.0 with bzlmod enabled

How to reproduce

1. Add rules_aws to MODULE.bazel
2. Build a rule that uses rules_aws with `--repo_env=PATH=/bin:/usr/bin`
3. See failure to invoke pkgutil.

Any other information?

Since pkgutil is under system integrity protection and is guaranteed to be located in /usr/sbin, the repo rule should directly invoke pkgutil in that location instead of relying on PATH available to repo env.

@pyrocat101 pyrocat101 added the bug Something isn't working label Sep 9, 2024
alexeagle added a commit that referenced this issue Sep 9, 2024
@alexeagle alexeagle linked a pull request Sep 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants