Skip to content

requirement: include HOMEBREW_PREFIX/sbin inPATH skip list#22087

Merged
MikeMcQuaid merged 1 commit intoHomebrew:mainfrom
hyuraku:requirement-skip-prefix-sbin-prepend
Apr 25, 2026
Merged

requirement: include HOMEBREW_PREFIX/sbin inPATH skip list#22087
MikeMcQuaid merged 1 commit intoHomebrew:mainfrom
hyuraku:requirement-skip-prefix-sbin-prepend

Conversation

@hyuraku
Copy link
Copy Markdown
Contributor

@hyuraku hyuraku commented Apr 25, 2026


  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them? Performance claims (e.g. "this is faster") must include Hyperfine benchmarks.
  • Have you written new tests (excluding integration tests) for your changes? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) with your changes locally?

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes. Non-maintainers may only have one AI-assisted/generated PR open at a time.

Fix typo in Requirement#modify_build_environment: the PATH skip-list duplicated HOMEBREW_PREFIX/bin instead of including HOMEBREW_PREFIX/sbin.

Copilot AI review requested due to automatic review settings April 25, 2026 15:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a typo in Requirement#modify_build_environment so the PATH “skip list” correctly includes HOMEBREW_PREFIX/sbin (it previously duplicated HOMEBREW_PREFIX/bin), and adds tests to prevent regression.

Changes:

  • Update Requirement#modify_build_environment to skip PATH prepends for both #{HOMEBREW_PREFIX}/bin and #{HOMEBREW_PREFIX}/sbin.
  • Add RSpec coverage ensuring requirements that return a path under HOMEBREW_PREFIX/bin or HOMEBREW_PREFIX/sbin do not trigger ENV.prepend_path.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Library/Homebrew/requirement.rb Corrects the PATH skip-list entry to include HOMEBREW_PREFIX/sbin.
Library/Homebrew/test/requirement_spec.rb Adds regression tests asserting no PATH prepend occurs for satisfy results under bin/sbin.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Apr 25, 2026
Merged via the queue into Homebrew:main with commit cc2848a Apr 25, 2026
39 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants