Skip to content
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

Return non-zero exit status for invalid commands #4129

Closed
wants to merge 1 commit into from

Conversation

neoaggelos
Copy link
Contributor

Summary

Closes #4091

Changes

  • Add a common NeedSubcommandRunE function, printing help message and returning an error
  • Set RunE for all top-level commands of ttn-lw-cli and ttn-lw-stack to return an error.

Testing

Test locally

Regressions

None

Notes for Reviewers

Draft since this is not a too elegant solution, see #4091 (comment)

Checklist

  • Scope: The referenced issue is addressed, there are no unrelated changes.
  • Compatibility: The changes are backwards compatible with existing API, storage, configuration and CLI, according to the compatibility commitments in README.md for the chosen target branch.
  • Documentation: Relevant documentation is added or updated.
  • Changelog: Significant features, behavior changes, deprecations and fixes are added to CHANGELOG.md.
  • Commits: Commit messages follow guidelines in CONTRIBUTING.md, there are no fixup commits left.

@neoaggelos neoaggelos added this to the v3.13.0 milestone May 5, 2021
@neoaggelos neoaggelos self-assigned this May 5, 2021
@neoaggelos neoaggelos requested a review from htdvisser May 5, 2021 09:25
@neoaggelos neoaggelos closed this May 5, 2021
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.

ttn-lw-cli exits 0 with invalid subcommand
1 participant