rustsec / rustsec/rustsec

Non-0 exit code if no subcommand is specified

Open
#334 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
2k
Forks
198
Avg merge
2d 6h
Merged PRs (30d)
8

Description

I think a few versions ago, the way to invoke cargo-audit was cargo audit.

By now, the API was changed, and it's now cargo audit audit.

Unfortunately if no subcommand is specified, the exit code is 0. So in a lot of my CI configurations, the command would just exit successfully without actually running the audit checks on my code.

Could we exit with a non-0 exit code if no subcommand is specified, to avoid this situation and alert people that updates in the calling style are required?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the cargo-audit CLI entry point and reproduce the behavior for cargo audit and cargo audit audit. Confirm that omitting the subcommand currently exits successfully; done means the no-subcommand invocation exits nonzero and the intended invocation still runs its audit checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.