From 12ddd182d9efbdc848b540f16484a583d52da0fb Mon Sep 17 00:00:00 2001 From: Thomas Tan Date: Tue, 21 Apr 2026 07:30:49 -0700 Subject: fix(powershell): conform to single quotes (#1740) Co-authored-by: William Boman --- lua/mason-core/installer/managers/powershell.lua | 2 +- lua/mason/health.lua | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'lua') 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