mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-07 15:21:06 +00:00
fix(exec): ignore malformed drive-less windows exec paths
This commit is contained in:
committed by
Peter Steinberger
parent
a26f4d0f3e
commit
e6ce31eb54
@@ -74,4 +74,16 @@ describe("executable path helpers", () => {
|
||||
);
|
||||
expect(resolveExecutablePath("~/missing-tool", { env: { HOME: homeDir } })).toBeUndefined();
|
||||
});
|
||||
|
||||
it("does not treat drive-less rooted windows paths as cwd-relative executables", () => {
|
||||
if (process.platform !== "win32") {
|
||||
return;
|
||||
}
|
||||
|
||||
expect(
|
||||
resolveExecutablePath(String.raw`:\Users\demo\AI\system\openclaw\git.exe`, {
|
||||
cwd: String.raw`C:\Users\demo\AI\system\openclaw`,
|
||||
}),
|
||||
).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user