From c8fa5dfaa3ecd104aa1a8c5f77de9c6287adbde3 Mon Sep 17 00:00:00 2001 From: William Boman Date: Sat, 22 Feb 2025 01:26:53 +0100 Subject: fix(spawn): expand executable paths on Windows before passing to uv_spawn (#1885) This fixes issues on Windows where uv_spawn fails to locate certain types of executables in PATH. --- lua/mason-core/process.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/mason-core/process.lua') diff --git a/lua/mason-core/process.lua b/lua/mason-core/process.lua index 22610ef1..882a8d41 100644 --- a/lua/mason-core/process.lua +++ b/lua/mason-core/process.lua @@ -224,7 +224,7 @@ function M.spawn(cmd, opts, callback) if handle == nil then log.fmt_error("Failed to spawn process. cmd=%s, err=%s", cmd, pid_or_err) if type(pid_or_err) == "string" and pid_or_err:find "ENOENT" == 1 then - opts.stdio_sink:stderr(("Could not find executable %q in path.\n"):format(cmd)) + opts.stdio_sink:stderr(("Could not find executable %q in PATH.\n"):format(cmd)) else opts.stdio_sink:stderr(("Failed to spawn process cmd=%s err=%s\n"):format(cmd, pid_or_err)) end -- cgit v1.2.3-70-g09d2