Skip to content

dor ensure and dor tool: accept --flag=value before -- - #1116

Open
dormouse-bot wants to merge 1 commit into
mainfrom
fix/dor-pre-delimiter-equals-flags
Open

dormouse-bot wants to merge 1 commit into
mainfrom
fix/dor-pre-delimiter-equals-flags

Conversation

@dormouse-bot

@dormouse-bot dormouse-bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

dor ensure and dor tool now accept the --flag=value form for their valued flags before --, the same as every other dor command. Before this, dor ensure --cwd=/tmp -- npm run dev failed with unknown option '--cwd=/tmp', while dor ensure --cwd /tmp -- … and dor split --surface=surface:3 -- … worked.

The cause is the argv check both commands run before stricli parses (scanPreDelimiterArgs in dor/src/commands/shared.ts). It matched only the exact --cwd string, so the = form fell through to its unknown-option branch. stricli itself parses --cwd=/tmp as --cwd with value /tmp, so the fix only teaches the pre-scan the same form:

  • A valued flag written --name=value is accepted.
  • --name= with nothing after it fails as --name requires a value, matching the space-separated form.
  • A boolean flag with = (--json=true) is still rejected as an unknown option, as before.

The new test in dor/test/cli-output.test.mjs covers ensure with --cwd= and --surface=, both forms of tool with --workspace=, the empty-value error, and the boolean case. It fails on main. Locally the rest of the dor suite passes, except five control-socket tests that also fail on main in this sandbox (listen EAFNOSUPPORT on a Unix socket).

The Cloudflare Pages preview build failed on this head, and on #1117 opened a minute later, while every other PR today passed it. Its log is only on the Cloudflare dashboard, which the bot can't read. pnpm --filter dormouse-website build succeeds locally on this head, and the diff doesn't touch the website. GitHub CI is green.

stricli parses --cwd=/tmp the same as --cwd /tmp, and every other dor
command takes it, but the pre-delimiter scan ensure and tool run before
stricli rejected it as an unknown option.

Co-Authored-By: Claude <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: a1607ee
Status:🚫  Build failed.

View logs

This branch has not been deployed

No deployments
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