Skip to content

Build your personal knowledge base with Trilium Notes

test(llm): drop the drive letter from the PATHEXT fixture

Elian Doran7f34247cedda
diff --git a/apps/server/src/services/llm/providers/claude_binary.spec.ts b/apps/server/src/services/llm/providers/claude_binary.spec.ts
index b39ead2a48..cfa50df868 100644
--- a/apps/server/src/services/llm/providers/claude_binary.spec.ts
+++ b/apps/server/src/services/llm/providers/claude_binary.spec.ts
@@ -104,8 +104,11 @@ describe("resolveClaudeBinaryPath", () => {
it("probes PATHEXT-style extensions on Windows (finds claude.cmd)", async () => {
stubPlatform("win32");
- const hit = path.join("C:\\npm", "claude.cmd");
- process.env.PATH = ["C:\\npm"].join(path.delimiter);
+ // No drive letter: a `C:` prefix would be split apart by the POSIX
+ // `:` PATH delimiter when this spec runs on a non-Windows host.
+ const dir = path.join("npm", "prefix");
+ const hit = path.join(dir, "claude.cmd");
+ process.env.PATH = dir;
existsSyncMock.mockImplementation((candidate: string) => candidate === hit);
probeSucceeds();