From 5a26b2f6906615475a4fd82506ccf8642b81d84e Mon Sep 17 00:00:00 2001 From: William Boman Date: Tue, 18 Apr 2023 11:35:50 +0200 Subject: fix(health): only check pwsh on Windows (#1232) --- lua/mason/health.lua | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'lua') diff --git a/lua/mason/health.lua b/lua/mason/health.lua index 2ffe81aa..8955b2e0 100644 --- a/lua/mason/health.lua +++ b/lua/mason/health.lua @@ -142,16 +142,6 @@ local function check_core_utils() relaxed = platform.is.win, } check { cmd = "tar", args = { "--version" }, name = "tar" } - check { - cmd = "pwsh", - args = { - "-NoProfile", - "-Command", - [[$PSVersionTable.PSVersion, $PSVersionTable.OS, $PSVersionTable.Platform -join " "]], - }, - name = "pwsh", - relaxed = not platform.is.win, - } if platform.is.unix then check { cmd = "bash", args = { "--version" }, name = "bash" } @@ -159,6 +149,15 @@ local function check_core_utils() end if platform.is.win then + check { + cmd = "pwsh", + args = { + "-NoProfile", + "-Command", + [[$PSVersionTable.PSVersion, $PSVersionTable.OS, $PSVersionTable.Platform -join " "]], + }, + name = "pwsh", + } check { cmd = "7z", args = { "--help" }, name = "7z", relaxed = true } end end -- cgit v1.3.1