Type of issue
Missing information
Feedback
for macos arm64 pc, pwsh path is /opt/homebrew/bin/pwsh . so, for the path, we can use this:
# Add Homebrew package management to the PowerShell environment.
# This logic mirrors the official Homebrew installation script,
# determining the installation path based on Apple Silicon vs Intel.
$homebrew_prefix = if ((uname -m) -eq "arm64") { "/opt/homebrew" } else { "/usr/local" }
Invoke-Expression (& "${homebrew_prefix}/bin/brew" shellenv | Out-String)
# TODO: Use $homebrew_prefix here, instead of using /usr/local/
Remove-Variable homebrew_prefix
You can use homebrew_prefix at TODO line in order to reach the bin location path...
Page URL
https://learn.microsoft.com/en-us/powershell/scripting/install/alternate-install-methods?view=powershell-7.6#install-on-macos-using-homebrew
Content source URL
https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/docs-conceptual/install/alternate-install-methods.md
Author
@sdwheeler
Platform Id
3c850702-3566-fa22-47e4-1934ef0ec70c
Document Id
de52bf12-bfdf-d860-ae4e-9a4334ec8c50
Type of issue
Missing information
Feedback
for macos arm64 pc, pwsh path is
/opt/homebrew/bin/pwsh. so, for the path, we can use this:You can use homebrew_prefix at TODO line in order to reach the bin location path...
Page URL
https://learn.microsoft.com/en-us/powershell/scripting/install/alternate-install-methods?view=powershell-7.6#install-on-macos-using-homebrew
Content source URL
https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/docs-conceptual/install/alternate-install-methods.md
Author
@sdwheeler
Platform Id
3c850702-3566-fa22-47e4-1934ef0ec70c
Document Id
de52bf12-bfdf-d860-ae4e-9a4334ec8c50