Skip to content

fix(cli): enable help output by explicitly enabling clap's help feature #540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 8, 2025

Conversation

debasishbsws
Copy link
Contributor

  • In clap v4, the feature system was restructured to be fully granular
  • With default-features = false, no features are enabled, including help
  • Previously in v3, help output was always included by default
  • Without explicitly enabling the help feature, running: ./linkerd-network-validator --help results in: error: unexpected argument found
  • This commit adds the help feature back to enable standard CLI help text

Ref: https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#400---2022-09-28

@debasishbsws debasishbsws requested a review from a team as a code owner July 2, 2025 08:35
…icitly

- In clap v4, the feature system was restructured to be fully granular
- With default-features = false, **no features** are enabled, including help
- Previously in v3, help output was always included by default
- Without explicitly enabling the help feature, running:
    ./linkerd-network-validator --help
  results in:
    error: unexpected argument found
- This commit adds the help feature back to enable standard CLI help text

Ref: https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#400---2022-09-28
Signed-off-by: Debasish Biswas <[email protected]>
Copy link

@cratelyn cratelyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a great idea. thank you @debasishbsws! 🙏

@cratelyn cratelyn merged commit 6f42679 into linkerd:main Jul 8, 2025
2 checks passed
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