mason.nvim
mason.nvim copied to clipboard
PWSH explecit error
I've searched open issues for similar requests
Yes
Is your feature request related to a problem? Please describe.
#706
Is it possible to add a hint during an error related to pwsh
?
Windows 11 has powershell (legacy version) installed by default, but Mason
requires a newer version of pwsh
. I could not immediately understand where exactly the error was, and after installing the powershell 7.3 version, everything worked
Code: https://github.com/williamboman/mason.nvim/pull/706/files#diff-1243700016801fd3c68dbc2d65f32bd9e12ae30b09e45031248e6e49065cf168R224-R233
Describe the solution you'd like
- Write to the user that he needs a new version of powershell
Describe potential alternatives you've considered
- Or add legacy powershell support
Additional context
No response
Faced same issue, why is that such a hard requirement for this specific package, can we not use the older version. I also faced the same issue on shellcheck and lemminx.
The same issue for me
Facing the same issue here. Can't this just support the legacy version so us boomers don't have to install a brand new Powershell? It's an extra thing to keep in mind. This has to be documented either way, because as mentioned above, the default powershell version is still not pwsh
for many systems.
Not only that, but this kind of completely borks support for win10 and even win11 by default which imo is bad idea. What was wrong with maybe checking which shell is available and use that instead, the more fallback options the better.
Hey! Ah that's interesting, I was under the impression that the old iteration of powershell had been phased out completely by now, seeing as the initial announcement was in 2017 IIRC. There's no particular reason to use pwsh
, reverting back to powershell.exe
should be perfectly fine
I believe #769 fixes this by reverting the change. If it does not let's reopen.
@williamboman , it is possible to do like this:
- If user doesn't have
pwsh
- usepowershell
- If user have
pwsh
- usepwsh
@williamboman , it is possible to do like this:
- If user doesn't have
pwsh
- usepowershell
- If user have
pwsh
- usepwsh
I've wanted to avoid doing this, but it seems like it's the only option. I was hoping Windows environments would be more predictable haha. Mason doesn't really call into Powershell that much, and all cmdlet invocations should be fully cross-compatible between Powershell versions (for now..).
edit: Done in https://github.com/williamboman/mason.nvim/pull/782
Just for documentation purposes:
I created a script at ~/pwsh.sh
with the following content as a workaround:
powershell "$@"
Wanted to create an issue for this, but found it was just fixed 😄 Thank you