Skip to content

fix: exit code is now 1 for unknown commands #1069

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
Jun 18, 2020

Conversation

remyleone
Copy link
Member

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #0000

Release note for CHANGELOG:


@remyleone remyleone marked this pull request as draft June 5, 2020 08:17
@remyleone remyleone self-assigned this Jun 5, 2020
@remyleone remyleone linked an issue Jun 5, 2020 that may be closed by this pull request
@remyleone
Copy link
Member Author

I think the problem start with this part of the cobra library: https://github.com/spf13/cobra/blob/master/command.go#L950-L970 but I'm not sure about how to solve it. Even with both SilentUsage and SilentError at false, the error does not bubble up to https://github.com/scaleway/scaleway-cli/blob/v2/internal/core/bootstrap.go#L215

@remyleone remyleone marked this pull request as ready for review June 18, 2020 16:08
Copy link
Contributor

@jerome-quere jerome-quere left a comment

Choose a reason for hiding this comment

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

LGTM

@remyleone remyleone merged commit b258cea into scaleway:v2 Jun 18, 2020
@remyleone remyleone deleted the exit1_commands branch June 18, 2020 16:58
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.

No error exit code when typing a command that doesn't exist
2 participants