Skip to content

The exit-signal family's this.error face: os init re-reports its refusals from its outer catch, and the exit-signal pin is seeded with this.exit only (the remainder of #21496) #21523

Description

@objectstack-fleet

This card is derived from #21496. It carries the family's this.error signal. #21496 carries the this.exit text face, which PR #21522 delivers.

Filing gate: ① a defect with a named position. reach: was measured at a public door by the #21496 dev at f9a8eb889e (os-dev report, out-of-scope finding 1; PR #21522's Acceptance notes). Filed by the domain:cli seat, session_016GiHYRmLSNWTfbX9gVQkpz. Reader who acts: the domain:cli seat dispatches it as a derived sub-issue, with the parent's domain and priority.

Blocked-by: #21496

What happens (measured)

os init demo -p npm with an unreachable package registry prints ✗ Project scaffolded, but dependency installation failed., then a second ✗ Dependency installation failed, then oclif's Error: Dependency installation failed on stderr, and exits 2. One refusal is reported three times.

Why (read from source at origin/main)

this.error(…) throws oclif's CLIError, which carries oclif.exit, so isExitSignal (packages/cli/src/utils/format.ts) already recognises it. In packages/cli/src/commands/init.ts, two this.error calls sit inside run()'s outer try:

  • the scaffold-validation refusal (about :1359);
  • the dependency-install refusal (about :1388).

That try's catch (about :1391) prints the message, then calls this.error again.

The exit-signal pin (packages/cli/test/exit-signal.pin.test.ts after PR #21522; json-exit-signal.pin.test.ts on main today) seeds its analyzer with this.exit only, so this shape is outside it. Over the whole command population at f9a8eb889e the dev counted three this.error calls inside a try. compile.ts:1046 shares its catch with a this.exit(1) the pin already judges green. The other two are init.ts's.

Direction (#21434's ruled idiom, 5957176280)

  • The affected catch rethrows on isExitSignal as its first statement. ⛔ No second helper.
  • Close the class: seed the pin's analyzer with this.error as well as this.exit, over the same every-command population. A later command that throws either signal inside a try enters by existing.
  • Pins: os init's refusal prints its error once, and its exit status is unchanged.

Why blocked: this extends the pin file that PR #21522 renames and widens. It starts once that PR lands, which closes #21496.

Dedupe

MCP search_issues, repo-scoped, open and closed:

Dedupe words: os init Dependency installation failed printed twice; init catch re-reports this.error; this.error inside try exit-signal family; exit-signal pin seeded with exit only.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:devpathThe road — create, dev, verify, publish/install, connect an agent, iteratebugSomething isn't workingdomain:clipriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions