Skip to content

Commit 00fc593

Browse files
committed
simplify command selection
1 parent 916f0bb commit 00fc593

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lua/mason/health.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,15 @@ local function check_core_utils()
113113
end
114114

115115
if platform.is.win then
116+
local powershell = vim.fn.executable "pwsh" == 1 and "pwsh" or "powershell"
116117
check {
117-
cmd = (vim.fn.executable "pwsh" == 1 and "pwsh" or "powershell"),
118+
cmd = powershell,
118119
args = {
119120
"-NoProfile",
120121
"-Command",
121122
[[$PSVersionTable.PSVersion, $PSVersionTable.OS, $PSVersionTable.Platform -join ' ']],
122123
},
123-
name = (vim.fn.executable "pwsh" == 1 and "pwsh" or "powershell") -- mason switched back to a powershell default
124+
name = powershell,
124125
}
125126
check { cmd = "7z", args = { "--help" }, name = "7z", relaxed = true }
126127
end

0 commit comments

Comments
 (0)