Compare commits
2 Commits
main
...
fix/window
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee24cfb58e | ||
|
|
ea7791f2b9 |
@ -24,6 +24,7 @@ Docs: https://docs.clawd.bot
|
|||||||
### Fixes
|
### Fixes
|
||||||
- BlueBubbles: stop typing indicator on idle/no-reply. (#1439) Thanks @Nicell.
|
- BlueBubbles: stop typing indicator on idle/no-reply. (#1439) Thanks @Nicell.
|
||||||
- Message tool: keep path/filePath as-is for send; hydrate buffers only for sendAttachment. (#1444) Thanks @hopyky.
|
- Message tool: keep path/filePath as-is for send; hydrate buffers only for sendAttachment. (#1444) Thanks @hopyky.
|
||||||
|
- CLI: handle Windows runtime exe argv and pnpm build shims more reliably. (#1480) Thanks @Takhoffman.
|
||||||
- Auto-reply: only report a model switch when session state is available. (#1465) Thanks @robbyczgw-cla.
|
- Auto-reply: only report a model switch when session state is available. (#1465) Thanks @robbyczgw-cla.
|
||||||
- Control UI: resolve local avatar URLs with basePath across injection + identity RPC. (#1457) Thanks @dlauer.
|
- Control UI: resolve local avatar URLs with basePath across injection + identity RPC. (#1457) Thanks @dlauer.
|
||||||
- Agents: surface concrete API error details instead of generic AI service errors.
|
- Agents: surface concrete API error details instead of generic AI service errors.
|
||||||
|
|||||||
@ -115,7 +115,12 @@ if (!shouldBuild()) {
|
|||||||
runNode();
|
runNode();
|
||||||
} else {
|
} else {
|
||||||
logRunner("Building TypeScript (dist is stale).");
|
logRunner("Building TypeScript (dist is stale).");
|
||||||
const build = spawn("pnpm", ["exec", compiler, ...projectArgs], {
|
const pnpmArgs = ["exec", compiler, ...projectArgs];
|
||||||
|
// On Windows, pnpm is a .cmd shim, so use cmd.exe for reliable resolution.
|
||||||
|
const buildCmd = process.platform === "win32" ? "cmd.exe" : "pnpm";
|
||||||
|
const buildArgs =
|
||||||
|
process.platform === "win32" ? ["/d", "/s", "/c", "pnpm", ...pnpmArgs] : pnpmArgs;
|
||||||
|
const build = spawn(buildCmd, buildArgs, {
|
||||||
cwd,
|
cwd,
|
||||||
env,
|
env,
|
||||||
stdio: "inherit",
|
stdio: "inherit",
|
||||||
|
|||||||
@ -78,6 +78,16 @@ describe("argv helpers", () => {
|
|||||||
});
|
});
|
||||||
expect(nodeArgv).toEqual(["node", "clawdbot", "status"]);
|
expect(nodeArgv).toEqual(["node", "clawdbot", "status"]);
|
||||||
|
|
||||||
|
const nodeExeArgv = buildParseArgv({
|
||||||
|
programName: "clawdbot",
|
||||||
|
rawArgs: ["C:\\\\Program Files\\\\nodejs\\\\Node.EXE", "clawdbot", "status"],
|
||||||
|
});
|
||||||
|
expect(nodeExeArgv).toEqual([
|
||||||
|
"C:\\\\Program Files\\\\nodejs\\\\Node.EXE",
|
||||||
|
"clawdbot",
|
||||||
|
"status",
|
||||||
|
]);
|
||||||
|
|
||||||
const directArgv = buildParseArgv({
|
const directArgv = buildParseArgv({
|
||||||
programName: "clawdbot",
|
programName: "clawdbot",
|
||||||
rawArgs: ["clawdbot", "status"],
|
rawArgs: ["clawdbot", "status"],
|
||||||
@ -89,6 +99,12 @@ describe("argv helpers", () => {
|
|||||||
rawArgs: ["bun", "src/entry.ts", "status"],
|
rawArgs: ["bun", "src/entry.ts", "status"],
|
||||||
});
|
});
|
||||||
expect(bunArgv).toEqual(["bun", "src/entry.ts", "status"]);
|
expect(bunArgv).toEqual(["bun", "src/entry.ts", "status"]);
|
||||||
|
|
||||||
|
const bunExeArgv = buildParseArgv({
|
||||||
|
programName: "clawdbot",
|
||||||
|
rawArgs: ["C:\\\\bun\\\\bun.exe", "src\\\\entry.ts", "status"],
|
||||||
|
});
|
||||||
|
expect(bunExeArgv).toEqual(["C:\\\\bun\\\\bun.exe", "src\\\\entry.ts", "status"]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("builds parse argv from fallback args", () => {
|
it("builds parse argv from fallback args", () => {
|
||||||
|
|||||||
@ -94,9 +94,14 @@ export function buildParseArgv(params: {
|
|||||||
: baseArgv[0]?.endsWith("clawdbot")
|
: baseArgv[0]?.endsWith("clawdbot")
|
||||||
? baseArgv.slice(1)
|
? baseArgv.slice(1)
|
||||||
: baseArgv;
|
: baseArgv;
|
||||||
const executable = normalizedArgv[0]?.split(/[/\\]/).pop() ?? "";
|
const executable = (normalizedArgv[0]?.split(/[/\\]/).pop() ?? "").toLowerCase();
|
||||||
|
// Normalize Windows `.exe` runtimes (node.exe/bun.exe) for runtime detection.
|
||||||
const looksLikeNode =
|
const looksLikeNode =
|
||||||
normalizedArgv.length >= 2 && (executable === "node" || executable === "bun");
|
normalizedArgv.length >= 2 &&
|
||||||
|
(executable === "node" ||
|
||||||
|
executable === "node.exe" ||
|
||||||
|
executable === "bun" ||
|
||||||
|
executable === "bun.exe");
|
||||||
if (looksLikeNode) return normalizedArgv;
|
if (looksLikeNode) return normalizedArgv;
|
||||||
return ["node", programName || "clawdbot", ...normalizedArgv];
|
return ["node", programName || "clawdbot", ...normalizedArgv];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user