Skip to content

config: show Windows build on WSL#22398

Open
MikeMcQuaid wants to merge 1 commit into
mainfrom
wsl-windows-config-version
Open

config: show Windows build on WSL#22398
MikeMcQuaid wants to merge 1 commit into
mainfrom
wsl-windows-config-version

Conversation

@MikeMcQuaid
Copy link
Copy Markdown
Member

  • read Edition, display version and build from registry
  • expose the host Windows version in brew config
  • fall back to ver when registry output is unavailable

  • 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.

OpenAI Codex 5.5 xhigh with local review and testing.


- read Edition, display version and build from registry
- expose the host Windows version in `brew config`
- fall back to `ver` when registry output is unavailable
Copilot AI review requested due to automatic review settings May 23, 2026 17:58
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

This PR extends brew config on Linux/WSL to expose the host Windows version/build, primarily by querying the Windows registry via cmd.exe (with a fallback to ver when registry data is unavailable).

Changes:

  • Add a SystemConfig.windows_version API returning the host Windows version string on WSL.
  • Implement Windows version detection on Linux/WSL using reg query (plus ver fallback) and print it in verbose config output.
  • Add RSpec coverage for parsing/formatting the Windows version and for the additional brew config output line on WSL.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
Library/Homebrew/test/cmd/config_spec.rb Adds tests for WSL Windows-version detection and for the new verbose config output line.
Library/Homebrew/system_config.rb Introduces a windows_version method on SystemConfig (default nil).
Library/Homebrew/extend/os/linux/system_config.rb Implements WSL Windows version detection (registry + ver fallback) and prints it in dump_verbose_config.

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

Comment thread Library/Homebrew/extend/os/linux/system_config.rb
@MikeMcQuaid MikeMcQuaid enabled auto-merge May 24, 2026 11:31
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.

2 participants