Repository navigation
dor ensure and dor tool: accept --flag=value before -- - #1116
Open
dormouse-bot wants to merge 1 commit into
Open
dormouse-bot wants to merge 1 commit into
dormouse-bot wants to merge 1 commit into
Conversation
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>
This branch has not been deployed
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.
dor ensureanddor toolnow accept the--flag=valueform for their valued flags before--, the same as every otherdorcommand. Before this,dor ensure --cwd=/tmp -- npm run devfailed withunknown option '--cwd=/tmp', whiledor ensure --cwd /tmp -- …anddor split --surface=surface:3 -- …worked.The cause is the argv check both commands run before stricli parses (
scanPreDelimiterArgsindor/src/commands/shared.ts). It matched only the exact--cwdstring, so the=form fell through to its unknown-option branch. stricli itself parses--cwd=/tmpas--cwdwith value/tmp, so the fix only teaches the pre-scan the same form:--name=valueis accepted.--name=with nothing after it fails as--name requires a value, matching the space-separated form.=(--json=true) is still rejected as an unknown option, as before.The new test in
dor/test/cli-output.test.mjscoversensurewith--cwd=and--surface=, both forms oftoolwith--workspace=, the empty-value error, and the boolean case. It fails onmain. Locally the rest of thedorsuite passes, except five control-socket tests that also fail onmainin this sandbox (listen EAFNOSUPPORTon a Unix socket).The
Cloudflare Pagespreview 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 buildsucceeds locally on this head, and the diff doesn't touch the website. GitHub CI is green.