Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
PowerShell installed as a .NET global tool cannot invoke its own CLI on macOS #12205
When PowerShell is installed as a .NET global tool, it prepends its own
However, on macOS
Therefore, from within a session invoking
Steps to reproduce
# Install PowerShell as a .NET global tool, to ~/.dotnet/tools dotnet tool install powershell -g # Invoke it, and try to re-invoke its own CLI. ~/.dotnet/tools/pwsh -noprofile -c 'pwsh -noprofile -c write-output hi' | Should -Be 'hi'
The test should succeed.
The test fails, due to incompatible binary being invoked:
Thanks for labeling, @SteveL-MSFT; please note that this problem will likely only affect people who use the .NET global tool version interactively.
The likelier use is for CI (automation), and for that #11747 is the much more serious bug (as yet not classified as a bug): something primarily used as a CLI not handling argument parsing properly is highly problematic.
#12176 too is unequivocally a not-yet-classified-as-such bug, though less impactful.