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

Fixes how we expose help and usage and expose output without making assumptions #305

Merged
merged 2 commits into from
Jul 15, 2016

Conversation

fabianofranz
Copy link
Contributor

@fabianofranz fabianofranz commented Jul 15, 2016

@eparis PTAL

@fabianofranz fabianofranz changed the title Fixes how we expose help and usage and expose out without making assumptions Fixes how we expose help and usage and expose output without making assumptions Jul 15, 2016
@eparis eparis merged commit b24564e into spf13:master Jul 15, 2016
dmitshur added a commit to gopherjs/gopherjs that referenced this pull request Jul 16, 2016
See spf13/cobra#305.

Use non-zero exit code for invalid command usage.

Fixes #489.
xh3b4sd added a commit to the-anna-project/annad that referenced this pull request Jul 16, 2016
xh3b4sd added a commit to the-anna-project/annad that referenced this pull request Jul 16, 2016
* fixed spf13/cobra breaking changes: spf13/cobra#305 (#167)
@fabianofranz
Copy link
Contributor Author

@DavidVorick agree about the need of a deprecation period, sorry about that.

Anyways, the concept and implementation here were very wrong - you would get different output on Help() - HelpFunc()(args), Usage() - UsageFunc()(args) - UsageString() depending on how you set custom funcs for help and usage. We must not make blind assumptions, but be very explicit and concise instead. Another example is Out() which were printing to Stderr if not set until recently, but was refactored to OutOrStdour() and OutOrStderr().

spoonofpower added a commit to spoonofpower/incubator-mynewt-newt that referenced this pull request Jul 18, 2016
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.

5 participants