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 a Tuple (exitCode int, err error) #956

Closed
sofianito opened this issue Sep 9, 2019 · 2 comments
Closed

Return a Tuple (exitCode int, err error) #956

sofianito opened this issue Sep 9, 2019 · 2 comments
Labels
kind/support Questions, supporting users, etc.

Comments

@sofianito
Copy link

Is it possible to have something like RunEE: func(cmd *cobra.Command, args []string) (exitCode int, err error) {}

I want to be able to return a specific exitCode (i.e. os.Exit(exitCode) when an error happens?

Any help appreciated.

Thx

@jharshman jharshman added the kind/support Questions, supporting users, etc. label Oct 3, 2019
@umarcor
Copy link
Contributor

umarcor commented Oct 3, 2019

In #841, there was some discussion about how errors are handled.

@jharshman
Copy link
Collaborator

Closing due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Questions, supporting users, etc.
Projects
None yet
Development

No branches or pull requests

3 participants