diff options
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | doc/mason.txt | 2 | ||||
| -rw-r--r-- | lua/mason-core/managers/powershell/init.lua | 4 | ||||
| -rw-r--r-- | lua/mason/health/init.lua | 12 |
4 files changed, 14 insertions, 6 deletions
@@ -73,7 +73,7 @@ The _minimum_ recommended requirements are: - neovim `>= 0.7.0` - For Unix systems: `git(1)`, `curl(1)` or `wget(1)`, `unzip(1)`, `tar(1)`, `gzip(1)` -- For Windows systems: powershell, git, tar, and [7zip][7zip] or [peazip][peazip] or [archiver][archiver] or [winzip][winzip] or [WinRAR][winrar] +- For Windows systems: pwsh, git, tar, and [7zip][7zip] or [peazip][peazip] or [archiver][archiver] or [winzip][winzip] or [WinRAR][winrar] Note that `mason.nvim` will regularly shell out to external package managers, such as `cargo` and `npm`. Depending on your personal usage, some of these will also need to be installed. Refer to `:checkhealth mason` for a full list. diff --git a/doc/mason.txt b/doc/mason.txt index a316c5e4..5a2f2c37 100644 --- a/doc/mason.txt +++ b/doc/mason.txt @@ -38,7 +38,7 @@ perfect substitutes). The _minimum_ recommended requirements are: - neovim `>= 0.7.0` - For Unix systems: `git(1)`, `curl(1)` or `wget(1)`, `unzip(1)`, `tar(1)`, `gzip(1)` -- For Windows systems: powershell, git, tar, and 7zip or peazip or archiver +- For Windows systems: pwsh, git, tar, and 7zip or peazip or archiver or winzip or WinRAR Note that `mason.nvim` will regularly shell out to external package managers, diff --git a/lua/mason-core/managers/powershell/init.lua b/lua/mason-core/managers/powershell/init.lua index 5cc5e21d..d2656194 100644 --- a/lua/mason-core/managers/powershell/init.lua +++ b/lua/mason-core/managers/powershell/init.lua @@ -15,7 +15,7 @@ function M.script(script, opts, custom_spawn) opts = opts or {} ---@type JobSpawn local spawner = custom_spawn or spawn - return spawner.powershell(vim.tbl_extend("keep", { + return spawner.pwsh(vim.tbl_extend("keep", { "-NoProfile", on_spawn = function(_, stdio) local stdin = stdio[1] @@ -35,7 +35,7 @@ function M.command(command, opts, custom_spawn) opts = opts or {} ---@type JobSpawn local spawner = custom_spawn or spawn - return spawner.powershell(vim.tbl_extend("keep", { + return spawner.pwsh(vim.tbl_extend("keep", { "-NoProfile", "-Command", PWSHOPT.progress_preference .. PWSHOPT.security_protocol .. command, diff --git a/lua/mason/health/init.lua b/lua/mason/health/init.lua index 5003bb0a..0e33911d 100644 --- a/lua/mason/health/init.lua +++ b/lua/mason/health/init.lua @@ -221,8 +221,16 @@ function M.check() relaxed = platform.is.win, }, check { cmd = "tar", args = { "--version" }, name = "tar" }, - -- when(platform.is.win, check { cmd = "powershell.exe", args = { "-Version" }, name = "PowerShell" }), -- TODO fix me - -- when(platform.is.win, check { cmd = "cmd.exe", args = { "-Version" }, name = "cmd" }) -- TODO fix me + check { + cmd = "pwsh", + args = { + "-NoProfile", + "-Command", + [[$PSVersionTable.PSVersion, $PSVersionTable.OS, $PSVersionTable.Platform -join " "]], + }, + name = "pwsh", + relaxed = not platform.is.win, + }, } if platform.is.unix then |
