Skip to content

Commit

Permalink
fix(powershell) convert "Stop" to 'Stop' and a join parameter to sing…
Browse files Browse the repository at this point in the history
…le quotes
  • Loading branch information
thomastan committed Nov 13, 2024
1 parent e2f7f90 commit 8d1a462
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lua/mason-core/managers/powershell/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions lua/mason/health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,13 @@ local function check_core_utils()

if platform.is.win then
check {
cmd = "pwsh",
cmd = (vim.fn.executable "pwsh" == 1 and "pwsh" or "powershell"),
args = {
"-NoProfile",
"-Command",
[[$PSVersionTable.PSVersion, $PSVersionTable.OS, $PSVersionTable.Platform -join " "]],
[[$PSVersionTable.PSVersion, $PSVersionTable.OS, $PSVersionTable.Platform -join ' ']],
},
name = "pwsh",
name = (vim.fn.executable "pwsh" == 1 and "pwsh" or "powershell") -- mason switched back to a powershell default
}
check { cmd = "7z", args = { "--help" }, name = "7z", relaxed = true }
end
Expand Down

0 comments on commit 8d1a462

Please sign in to comment.