Skip to content

Allow mixed env keys in script wrappers - #23360

Merged
chenrui333 merged 1 commit into
mainfrom
fix-opentsdb-install
Jul 30, 2026
Merged

Allow mixed env keys in script wrappers#23360
chenrui333 merged 1 commit into
mainfrom
fix-opentsdb-install

Conversation

@MikeMcQuaid

Copy link
Copy Markdown
Member
  • Match env_script_all_files with write_env_script
  • Avoid Sorbet failures when formulae extend environment hashes

  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include Hyperfine benchmarks.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

OpenAI Codex 5.6 Sol xhigh with local review and testing.


- Match `env_script_all_files` with `write_env_script`
- Avoid Sorbet failures when formulae extend environment hashes
Copilot AI review requested due to automatic review settings July 30, 2026 09:24
@MikeMcQuaid
MikeMcQuaid enabled auto-merge July 30, 2026 09:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Aligns Pathname#env_script_all_files’s Sorbet type signature with Pathname#write_env_script so callers can pass environment hashes that contain a mix of Symbol and String keys (a pattern used when environment hashes are extended/merged), and adds a spec to cover that behavior.

Changes:

  • Broaden env_script_all_files’s env key type to T.any(String, Symbol) to match write_env_script.
  • Update the env_script_all_files spec to exercise mixed key types (Symbol + String) and verify wrapper output.

Reviewed changes

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

File Description
Library/Homebrew/extend/pathname.rb Updates Sorbet signature for env_script_all_files to accept mixed String/Symbol env keys, matching write_env_script.
Library/Homebrew/test/extend/pathname_spec.rb Adjusts/renames the spec to assert mixed env key types work end-to-end and generate the expected wrapper scripts.

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

@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Jul 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 30, 2026
@chenrui333
chenrui333 added this pull request to the merge queue Jul 30, 2026
Merged via the queue into main with commit decf7f1 Jul 30, 2026
45 checks passed
@chenrui333
chenrui333 deleted the fix-opentsdb-install branch July 30, 2026 13:17
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.

4 participants