diff options
| author | Thomas Tan <thomas.tan@msn.com> | 2026-04-21 07:30:49 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-21 16:30:49 +0200 |
| commit | 12ddd182d9efbdc848b540f16484a583d52da0fb (patch) | |
| tree | eda3ab047d41b50c2a09ac7b552819548d1fcad3 /lua | |
| parent | chore(ci): update stylua, selene, neovim (#2078) (diff) | |
| download | mason-12ddd182d9efbdc848b540f16484a583d52da0fb.tar mason-12ddd182d9efbdc848b540f16484a583d52da0fb.tar.gz mason-12ddd182d9efbdc848b540f16484a583d52da0fb.tar.bz2 mason-12ddd182d9efbdc848b540f16484a583d52da0fb.tar.lz mason-12ddd182d9efbdc848b540f16484a583d52da0fb.tar.xz mason-12ddd182d9efbdc848b540f16484a583d52da0fb.tar.zst mason-12ddd182d9efbdc848b540f16484a583d52da0fb.zip | |
Co-authored-by: William Boman <william@redwill.se>
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/mason-core/installer/managers/powershell.lua | 2 | ||||
| -rw-r--r-- | lua/mason/health.lua | 7 |
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 |
