Reject empty values passed to --dep-root

Open Beginner friendly
#649 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start in src/cli.rs and inspect the separate-argument branch alongside the existing --dep-root= validation. Run the existing CLI tests, then add coverage for empty and whitespace-only values in both spellings while checking that valid relative and absolute paths remain unchanged and invalid inputs use the existing usage-error style.

Written by the indexing model from the issue text.

Description

bug good first issue

Current evidence

src/cli.rs rejects an empty value in the --dep-root=<path> form, but the separate --dep-root <path> branch pushes the following argument directly into g.dep.roots without checking whether it is empty or whitespace-only.

The two spellings of the same option therefore have different validation behavior.

Scope

  • Apply the same non-empty validation to both --dep-root=<path> and --dep-root <path>.
  • Treat whitespace-only values as missing values.
  • Preserve valid relative and absolute dependency-root paths.
  • Do not add filesystem-existence requirements to this task.

Completion criteria

  • CLI tests cover empty and whitespace-only values for both option spellings.
  • Valid values continue to populate dependency roots unchanged.
  • Invalid values use the existing CLI usage-error path and message style.
Dominant language
Rust
Stars
53
Forks
16
Avg merge
4h 6m
Merged PRs (30d)
44

Contributor guide

Open the contributing guide

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.

More from wavefnd/Wave

All issues in wavefnd/Wave

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.