Skip to content

fix(cli): normalize the optional daemon action arg before indexing - #38

Merged
espetro merged 2 commits into
mainfrom
fix/daemon-optional-arg
Dec 2, 2026
Merged

espetro merged 2 commits into
mainfrom
fix/daemon-optional-arg

Conversation

@espetro

@espetro espetro commented Dec 2, 2026

Copy link
Copy Markdown
Owner

The library hands an absent optional positional over as null. On the Node path the loose cast hid it, but the native binary's type claim rejects null before the string cast, so the compiled daemon exited with expected string at $[0], got null on every start — 0.7.0's daemon could never come up on the VPS. Map the slot to a string before rest[] indexing.

Verified with a local darwin-arm64 build: daemon now starts and stays up (Node path unaffected). Patch bump to 0.7.1.

The library hands an absent optional positional over as null. On the
Node path the loose cast hid it, but the native binary's type claim
rejects null before the string cast, so the compiled daemon exited with
'typeerror: expected string at $[0], got null' on every start. Map the
slot to a string before rest[] indexing.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Deploying coordinated with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3fae033
Status: ✅  Deploy successful!
Preview URL: https://995f11f5.coordinated.pages.dev
Branch Preview URL: https://fix-daemon-optional-arg.coordinated.pages.dev

View logs

@espetro
espetro merged commit 6e7b4c0 into main Dec 2, 2026
4 checks passed
@espetro
espetro deleted the fix/daemon-optional-arg branch December 2, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant