Teach client to find Homebrew installations on Apple Silicon#5164
Merged
andyleejordan merged 1 commit intomainfrom Mar 26, 2025
Merged
Teach client to find Homebrew installations on Apple Silicon#5164andyleejordan merged 1 commit intomainfrom
andyleejordan merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for detecting Homebrew-installed PowerShell on Apple Silicon by updating both the platform detection logic and related tests. Key changes include:
- Defining new constants and functions to locate Homebrew installations in src/platform.ts.
- Updating the enumeration order to search for Homebrew stable, LTS, and preview installations on macOS.
- Enhancing tests in test/core/platform.test.ts to validate the correct discovery of Homebrew installations.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/core/platform.test.ts | Adds test cases for Homebrew installation paths (stable, LTS, preview). |
| src/platform.ts | Introduces constants and functions to locate Homebrew installations on macOS. |
Comments suppressed due to low confidence (3)
test/core/platform.test.ts:598
- The Homebrew stable installation path is set to "/usr/local/bin/pwsh", but on Apple Silicon it should be "/opt/homebrew/bin/pwsh". Please update this path to reflect the correct location.
{ exePath: "/usr/local/bin/pwsh", displayName: "PowerShell (Homebrew)", supportsProperArguments: true }
test/core/platform.test.ts:604
- The Homebrew LTS installation path is set to "/usr/local/bin/pwsh-lts", but it should be "/opt/homebrew/bin/pwsh-lts" for Apple Silicon. Consider updating to the correct path.
{ exePath: "/usr/local/bin/pwsh-lts", displayName: "PowerShell LTS (Homebrew)", supportsProperArguments: true }
test/core/platform.test.ts:614
- The Homebrew preview installation path is set to "/usr/local/bin/pwsh-preview", but it should be "/opt/homebrew/bin/pwsh-preview" for Apple Silicon. Please update this accordingly.
{ exePath: "/usr/local/bin/pwsh-preview", displayName: "PowerShell Preview (Homebrew)", supportsProperArguments: true }
Member
Author
|
|
Since `/opt/homebrew` is now used instead of `/usr/local`.
SydneyhSmith
approved these changes
Mar 26, 2025
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.
Since
/opt/homebrewis now used instead of/usr/local.This annoyed me when setting up a new MacBook.