aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/mason-core/installer/managers/powershell.lua2
-rw-r--r--lua/mason/health.lua7
2 files changed, 5 insertions, 4 deletions
diff --git a/lua/mason-core/installer/managers/powershell.lua b/lua/mason-core/installer/managers/powershell.lua
index 0e7f4145..372426e8 100644
--- a/lua/mason-core/installer/managers/powershell.lua
+++ b/lua/mason-core/installer/managers/powershell.lua
@@ -8,7 +8,7 @@ local M = {}
local PWSHOPT = {
progress_preference = [[ $ProgressPreference = 'SilentlyContinue'; ]], -- https://stackoverflow.com/a/63301751
security_protocol = [[ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; ]],
- error_action_preference = [[ $ErrorActionPreference = "Stop"; ]],
+ error_action_preference = [[ $ErrorActionPreference = 'Stop'; ]],
}
local powershell = _.lazy(function()
diff --git a/lua/mason/health.lua b/lua/mason/health.lua
index e439736a..557fdc5f 100644
--- a/lua/mason/health.lua
+++ b/lua/mason/health.lua
@@ -113,14 +113,15 @@ local function check_core_utils()
end
if platform.is.win then
+ local powershell = vim.fn.executable "pwsh" == 1 and "pwsh" or "powershell"
check {
- cmd = "pwsh",
+ cmd = powershell,
args = {
"-NoProfile",
"-Command",
- [[$PSVersionTable.PSVersion, $PSVersionTable.OS, $PSVersionTable.Platform -join " "]],
+ [[$PSVersionTable.PSVersion, $PSVersionTable.OS, $PSVersionTable.Platform -join ' ']],
},
- name = "pwsh",
+ name = powershell,
}
check { cmd = "7z", args = { "--help" }, name = "7z", relaxed = true }
end