fix(scripts): build-art path resolution on Windows#7
Closed
nanami-he wants to merge 1 commit into
Closed
Conversation
`new URL(".", import.meta.url).pathname` returns "/C:/..." on Windows
(POSIX-style with leading slash). join()-ing that with a relative segment
produced "\C:\..." which fs() then failed to open with ENOENT. This
blocked `bun run build` on Windows, which in turn blocked any local
install that needs to regenerate dist/.
Switched to `dirname(fileURLToPath(import.meta.url))` — same pattern the
rest of the codebase already uses (cli/index.js, cli/openclaw-patch.ts).
Surfaced while running the full build pipeline on Win11 to test the
findPackageRoot fix from the same branch.
4 tasks
Owner
Author
|
closing in favor of #12 — @Lwhieldon got there too with the same |
nanami-he
pushed a commit
that referenced
this pull request
Apr 29, 2026
…ows path (#12) - Redesigned golden retriever ASCII art into a front-facing friendly dog face (matches the 10-pet front-facing convention; old side-profile read as a dinosaur to a real golden retriever owner) - pet_pet now returns a full renderPetCard wrapped in a code fence so `/pet pet` shows a visual in VSCode integrated terminal where the bash statusline hook does not run - build-art.ts: fileURLToPath replaces `new URL(".", import.meta.url).pathname` which returned `/C:/...` on Windows, causing ENOENT on the statusline write (same fix that was independently in #7, now closed in favor of this PR) Closes #10.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Surfaced while running
bun run buildon Win11 (the build:art step blocks any local install that needs to regeneratedist/):new URL(".", import.meta.url).pathnamereturns/C:/...on Windows (POSIX-style with leading slash).join()-ing that with a relative segment produced\C:\...whichfs.readFileSyncthen failed to open.Fix: switched to
dirname(fileURLToPath(import.meta.url))— the same pattern already used incli/index.jsandcli/openclaw-patch.ts. Same anti-pattern, same shape of fix as #6.This was the second commit on the original
fix/find-package-root-windows-infinite-loopbranch but didn't make it into the squash-merge of #6 / v0.4.3. Splitting it out as its own PR.Test plan
bun run buildon Win11 — full pipeline succeeds, writesdist/,statusline/pet-status.sh,~/.petsonality/reactions-pool.jsonbun test— 305 pass, 0 fail (no impact)🤖 Generated with Claude Code