Skip to content

Commit f77464d

Browse files
easyteacherBradGroux
authored andcommitted
fix: use pathToFileURL for Windows path comparison in generate-base-config-schema
The script was using new URL() to compare import.meta.url with process.argv[1], which fails on Windows because new URL() doesn't properly convert Windows paths to file URLs. Using pathToFileURL from node:url correctly handles this conversion.
1 parent 53efd63 commit f77464d

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ Docs: https://docs.openclaw.ai
4747
- Codex app-server: annotate message-tool-only direct chat turns in the dynamic `message` tool spec so visible replies are sent through `message(action="send")` instead of staying private. (#79704)
4848
- Codex app-server: default implicit local stdio app-server permissions to guardian when Codex system requirements disallow the YOLO approval, reviewer, or sandbox value, including hostname-scoped remote sandbox entries, avoiding turn-start failures on managed hosts that permit only reviewed approval or narrower sandboxes.
4949
- Plugins/install: run managed npm-root install, uninstall, prune, and repair commands from the managed root without a redundant `--prefix .`, avoiding npm 10.9.3 Arborist crashes on native Windows WhatsApp plugin installs. Fixes #78514. (#78902) Thanks @melihselamett-stack.
50+
- Config/schema/Windows: detect direct execution of the base config schema generator with `pathToFileURL` so Windows paths with backslashes still run the `--check` and `--write` command body. (#52989) Thanks @easyteacher.
5051
- Discord/voice: stream ElevenLabs TTS directly into Discord playback and send ElevenLabs latency optimization as the documented query parameter so spoken replies can start sooner.
5152
- Discord/voice: keep TTS playback running when another user starts speaking, ignore new capture during playback to avoid feedback loops, and downgrade expected receive-stream aborts to verbose diagnostics.
5253
- iMessage: expose native private-API message actions through `imsg rpc` for reactions, edits, unsends, replies, rich sends, attachments, and group management when `imsg status --json` reports the required bridge capabilities.

scripts/generate-base-config-schema.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env node
2+
import { pathToFileURL } from "node:url";
23
import { computeBaseConfigSchemaResponse } from "../src/config/schema-base.js";
34

45
export function checkBaseConfigSchema(): void {
@@ -12,7 +13,7 @@ if (args.has("--check") && args.has("--write")) {
1213
throw new Error("Use either --check or --write, not both.");
1314
}
1415

15-
if (import.meta.url === new URL(process.argv[1] ?? "", "file://").href) {
16+
if (import.meta.url === pathToFileURL(process.argv[1] ?? "").href) {
1617
checkBaseConfigSchema();
1718
if (args.has("--write")) {
1819
console.log("[base-config-schema] runtime-computed; no generated file to write");

0 commit comments

Comments
 (0)