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

fix(cli): command executed twice on error #42

Merged
merged 1 commit into from Aug 12, 2019
Merged

Conversation

rfratto
Copy link
Member

@rfratto rfratto commented Aug 12, 2019

Running tk show with no arguments would print the help text twice, like so:

Error: accepts 1 arg(s), received 0
Usage:
  tk show [directory] [flags]

Flags:
  -h, --help             help for show
  -t, --target strings   only use the specified objects (Format: <type>/<name>)

Global Flags:
  -v, --verbose

Error: accepts 1 arg(s), received 0
Usage:
  tk show [directory] [flags]

Flags:
  -h, --help             help for show
  -t, --target strings   only use the specified objects (Format: <type>/<name>)

Global Flags:
  -v, --verbose

Ouch: accepts 1 arg(s), received 0

This PR fixes the repeated output.

Running `tk show` with no arguments would print the
help text twice.
@rfratto rfratto requested a review from sh0rez August 12, 2019 18:27
@sh0rez sh0rez changed the title cmd/tk: fix invalid command being executed twice fix(cli): command executed twice on error Aug 12, 2019
Copy link
Member

@sh0rez sh0rez left a comment

Choose a reason for hiding this comment

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

LGTM

@sh0rez sh0rez merged commit 28c6898 into master Aug 12, 2019
@sh0rez sh0rez deleted the fix_double_output branch August 12, 2019 19:30
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.

None yet

2 participants