Skip to content

fix: expect oclif parse exit code 2 for invalid-input NUTs @W-22403352#414

Merged
EstebanRomero84 merged 2 commits intomainfrom
sh/fix-NUTs
May 7, 2026
Merged

fix: expect oclif parse exit code 2 for invalid-input NUTs @W-22403352#414
EstebanRomero84 merged 2 commits intomainfrom
sh/fix-NUTs

Conversation

@shetzel
Copy link
Copy Markdown
Contributor

@shetzel shetzel commented May 7, 2026

Six NUT cases asserted ensureExitCode: 1 but the commands fail at oclif flag-parse time (Flags.file({ exists: true }), parse callbacks that throw, validate callbacks, and missing required flags), which exits with code 2. Update the assertions to match.

@W-22403352@

shetzel and others added 2 commits May 7, 2026 13:34
Six NUT cases asserted ensureExitCode: 1 but the commands fail at
oclif flag-parse time (Flags.file({ exists: true }), parse callbacks
that throw, validate callbacks, and missing required flags), which
exits with code 2. Update the assertions to match.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The exit code for these oclif parse failures differs by sf-plugins-core
version: 12.2.6 (bundled in CLI 2.135.0) emits 2, while 12.2.13 (used
in plugin-agent's own CI) catches the parse error and re-emits exit 1.
Use 'nonZero' so the assertion is correct in both environments.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@EstebanRomero84 EstebanRomero84 merged commit d1c8709 into main May 7, 2026
13 checks passed
@EstebanRomero84 EstebanRomero84 deleted the sh/fix-NUTs branch May 7, 2026 20:47
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.

2 participants