Skip to content

fix(cli): handle empty shell values and bare test - #4292

Open
JaiPatel713 wants to merge 1 commit into
rtk-ai:developfrom
JaiPatel713:fix/cli-shell-test-errors
Open

JaiPatel713 wants to merge 1 commit into
rtk-ai:developfrom
JaiPatel713:fix/cli-shell-test-errors

Conversation

@JaiPatel713

Copy link
Copy Markdown

Fixes #4290.

Summary

  • reject empty --shell= values during Clap argument parsing for err, test, and summary
  • make bare rtk test return exit code 1 without emitting an anyhow error chain
  • add cross-platform regression tests for both behaviors

Testing

  • cargo fmt --all --check — passed
  • cargo clippy --all-targets — passed
  • cargo test --test cli_runner_contract_test — 2 passed
  • manual empty --shell= check — exit 2 with Clap error
  • manual bare rtk test check — exit 1 with no output
  • full Windows test suite matches clean upstream/develop: 3743 passed, 19 failed, 8 ignored

@CLAassistant

CLAassistant commented Sep 26, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@rtk-wshm-sync-bot rtk-wshm-sync-bot Bot added bug Something isn't working cli tests labels Sep 26, 2026
@rtk-wshm-sync-bot

Copy link
Copy Markdown

wshm · Automated triage by AI

📊 Automated PR Analysis

🐛 Type bug-fix
🟢 Risk low

Summary

Fixes CLI argument handling in the Rust runner: empty --shell= values are now rejected by Clap's NonEmptyStringValueParser for the err, test, and summary subcommands, and a bare rtk test invocation now returns exit code 1 silently instead of surfacing an anyhow error chain. Adds a new integration test file covering both regressions.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Linked issues: #4290


Analyzed automatically by wshm · This is an automated analysis, not a human review.

@JaiPatel713

Copy link
Copy Markdown
Author

Moderators please review this

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

Labels

bug Something isn't working cli tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

An empty --shell= value and a bare rtk test answer with an anyhow chain at exit 1, not the promised clap usage error

2 participants