fix(daemon): prefer current node and add macOS version manager paths to service PATH
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user