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

pd-ctl: fix always show help info after using --help once #988

Merged
merged 1 commit into from
Mar 14, 2018

Conversation

Connor1996
Copy link
Member

@Connor1996 Connor1996 commented Mar 13, 2018

Take config show command as an example:
when first call config show --help, it will save help flag in config-show command struct . And we reuse the rootCmd, thus when call config show, it still get the command struct which has saved help flag and print help info. So initialing rootCmd every time we call pd-ctl.Start()

@disksing
Copy link
Contributor

Please add description about the reason of the bug and how you fixed it.

Copy link
Contributor

@nolouch nolouch left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@disksing disksing left a comment

Choose a reason for hiding this comment

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

LGTM.

@disksing disksing merged commit a7dc37b into tikv:master Mar 14, 2018
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.

3 participants