powershell task should now prefer `pwsh` on mac/linux
See original GitHub issueThe executable has changed now for powershell core to pwsh
instead of powershell
, even on Windows. On Mac/Linux we should definitely prefer pwsh and fallback to powershell for back-compat. On Windows, I think we should just try powershell
since I’m not sure why that wouldn’t be in the PATH and preferring pwsh seems incorrect.
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (5 by maintainers)
Top Results From Across the Web
Getting Started with PowerShell Core on Windows, Mac, and ...
Today we have a guest post from Honorary Script Guy and Microsoft Premier ... This version of PowerShell will be different than the...
Read more >Determine the OS version, Linux and Windows from Powershell
The OS-specific ones I see for now are $IsLinux , IsMacOS and $IsWindows . This is of at least PowerShell version 6.0.0-rc and...
Read more >I'm interested now that PowerShell is cross platform. For ...
that I want to use both on Windows and Linux. Since there are certain tasks that are more suitable with regular shell, I...
Read more >Advanced PowerShell Automation - CBT Nuggets
This advanced Microsoft Advanced PowerShell Automation prepares systems administrators to automate complex administrative tasks using Windows PowerShell.
Read more >Adopting PowerShell (on Mac) | Philippe.me
This one doesn't have a direct equivalent. Like on Windows you would generally escalate your session: sudo pwsh -NoProfile will spawn an admin- ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
fixed in master https://github.com/Microsoft/vsts-tasks/pull/6175
will roll out with the next deployment. the next deployment starts next week and will roll out over a week or two.
I’ve found my problem.
I am using Terraform to create and setup a Linux agent with the remote-exec provisionner:
When executing the ./config.sh command, the file .path is created with the current $PATH and it is used to setup the PATH capability. But but the path does not contains /snap/bin folder!
And thus the Azure Powershell Task failed with which pwsh => not found.
=> set the PATH before executing ./config.sh: