Skip to content

mr apply --skip flag rejected at runtime despite appearing in --help #625

@schickling-assistant

Description

@schickling-assistant

Symptom

nix run github:overengineeringstudio/effect-utils/42d338478ca854a9c88b87b6eff8f645a3639dd2#megarepo -- apply --all --skip schickling-beads --skip overeng-beads

fails with:

Received unknown argument: '--skip'
Error: {"_tag":"InvalidValue","error":{"_tag":"Paragraph","value":{"_tag":"Text","value":"Received unknown argument: '--skip'"}}}

But mr apply --help from the same binary advertises the flag:

$ apply [(-o, --output ...)] [--dry-run] [(-f, --force)] [--all] [--only text] [--skip text] [...]

Reproduces with --skip foo --skip bar (space-separated) and with a single --skip value. --skip=value syntax either succeeds silently or triggers the actual apply path.

Impact

schickling/megarepo-all's applyMegarepoLockStep genie helper emits --skip foo --skip bar:

https://github.com/overengineeringstudio/effect-utils/blob/main/genie/ci-workflow.ts (search applyMegarepoLockStep, skipArgs = opts?.skip?.flatMap((s) => ['--skip', s]).join(' '))

Using applyMegarepoLockStep({ skip: [...] }) in downstream genie configs therefore crashes CI.

Workaround

Downstream repos must not pass skip to applyMegarepoLockStep until this is fixed, or must hand-write the CI step using --only (which works with space-separated args) or --skip=... syntax.

Suggested fix

Either:

  • Fix the CLI parser to accept --skip foo --skip bar form (matches the help output and the --only behaviour); or
  • Update applyMegarepoLockStep in genie to emit the --skip=foo form the CLI actually accepts.

Related

  • schickling/megarepo-all#80 (PR that hit this)
  • schickling/megarepo-all CI has been red on main for this reason (beads auth errors block mr apply --all)

Filed by an AI assistant on behalf of @schickling

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions