From 3ec936d1b450a6a1c79fe72489229264e79c8d8f Mon Sep 17 00:00:00 2001 From: Yao Date: Tue, 17 Feb 2026 01:27:49 +0800 Subject: [PATCH] fix(daemon): prefer current node and add macOS version manager paths to service PATH --- src/daemon/runtime-paths.test.ts | 3 ++- src/daemon/service-env.test.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/daemon/runtime-paths.test.ts b/src/daemon/runtime-paths.test.ts index 95849ca2f..45d7142ec 100644 --- a/src/daemon/runtime-paths.test.ts +++ b/src/daemon/runtime-paths.test.ts @@ -53,7 +53,8 @@ describe("resolvePreferredNodePath", () => { throw new Error("missing"); }); - const execFile = vi.fn() + const execFile = vi + .fn() .mockResolvedValueOnce({ stdout: "18.0.0\n", stderr: "" }) // execPath too old .mockResolvedValueOnce({ stdout: "22.12.0\n", stderr: "" }); // system node ok diff --git a/src/daemon/service-env.test.ts b/src/daemon/service-env.test.ts index 591096096..c9e86f7cf 100644 --- a/src/daemon/service-env.test.ts +++ b/src/daemon/service-env.test.ts @@ -148,7 +148,9 @@ describe("getMinimalServicePathParts - Linux user directories", () => { }); // fnm on macOS defaults to ~/Library/Application Support/fnm - const fnmIndex = result.indexOf("/Users/testuser/Library/Application Support/fnm/aliases/default/bin"); + const fnmIndex = result.indexOf( + "/Users/testuser/Library/Application Support/fnm/aliases/default/bin", + ); const homebrewIndex = result.indexOf("/opt/homebrew/bin"); expect(fnmIndex).toBeGreaterThan(-1);