Allow mixed env keys in script wrappers - #23360
Merged
Merged
Conversation
- Match `env_script_all_files` with `write_env_script` - Avoid Sorbet failures when formulae extend environment hashes
Contributor
There was a problem hiding this comment.
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’senvkey type toT.any(String, Symbol)to matchwrite_env_script. - Update the
env_script_all_filesspec 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.
botantony
approved these changes
Jul 30, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jul 30, 2026
chenrui333
approved these changes
Jul 30, 2026
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.
env_script_all_fileswithwrite_env_scriptbrewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?OpenAI Codex 5.6 Sol xhigh with local review and testing.