cobra icon indicating copy to clipboard operation
cobra copied to clipboard

Fix minor annoyance of missing '--version' flag from some Help output

Open fnickels opened this issue 2 years ago • 7 comments

In the current code, with a version set, app help does not display the switch option --version, while app --help does.

  • Fix missing '--version' flag from help command
    • with unit tests
  • Add vscode to .gitignore

fnickels avatar May 24 '22 02:05 fnickels

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar May 24 '22 02:05 CLAassistant

The Cobra project currently lacks enough contributors to adequately respond to all PRs. This bot triages issues and PRs according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied. - After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied and the PR is closed. You can:
  • Make a comment to remove the stale label and show your support. The 60 days reset. - If a PR has lifecycle/rotten and is closed, comment and ask maintainers if they'd be interseted in reopening.

github-actions[bot] avatar Sep 07 '22 00:09 github-actions[bot]

great that you fixed it @fnickels , I also just noticed this thing. Hope it gets merged soon.

gusega avatar Sep 13 '22 16:09 gusega

Will do

On Sun, Sep 18, 2022, 7:40 PM Marc Khouzam @.***> wrote:

@.**** requested changes on this pull request.

This is great @fnickels https://github.com/fnickels ! Thanks for fixing this.

Everything looks good except one nit.

In .gitignore https://github.com/spf13/cobra/pull/1707#discussion_r973821512:

@@ -37,3 +37,5 @@ bin

.idea/ *.iml + +.vscode

I guess this makes sense, but:

  1. it shouldn't be in this PR
  2. it is recommended to use your own global gitignore for those things

My guess is that you didn't realize it sneaked in here. Could you remove it?

— Reply to this email directly, view it on GitHub https://github.com/spf13/cobra/pull/1707#pullrequestreview-1111640240, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7UQXCH3M4KU6U6W3MZQQDV67HBJANCNFSM5WXXNOHQ . You are receiving this because you were mentioned.Message ID: @.***>

fnickels avatar Sep 19 '22 14:09 fnickels

Yeah, That's what I used.

I sort of knew this existed but have always been too lazy to look it up and configure it.

Should the .idea/ reference also be removed from .gitignore?

francis…

Francis J. Nickels III

Riot Games

@.*** | C: +1.310.598.8267

Summoner Name: target1

On Mon, Sep 19, 2022 at 10:27 AM Marc Khouzam @.***> wrote:

@.**** commented on this pull request.

In .gitignore https://github.com/spf13/cobra/pull/1707#discussion_r974502626:

@@ -37,3 +37,5 @@ bin

.idea/ *.iml + +.vscode

If it helps: git config --global core.excludesfile ~/.gitignore

— Reply to this email directly, view it on GitHub https://github.com/spf13/cobra/pull/1707#discussion_r974502626, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7UQXD7O7S5PIDLZHOQHFTV7CO63ANCNFSM5WXXNOHQ . You are receiving this because you were mentioned.Message ID: @.***>

fnickels avatar Sep 19 '22 17:09 fnickels

Should the .idea/ reference also be removed from .gitignore?

There is no official agreement to not put those things in the .gitignore for this project, but I at least didn't want to "pollute" your nice PR with those changes.

marckhouzam avatar Sep 19 '22 19:09 marckhouzam

@jpmcb This PR fixes the fact that the --version flag was not output by the help command. I don't think that changing help output is a backwards-compatible issue, so I fee this should go in. Ok with you?

marckhouzam avatar Sep 19 '22 19:09 marckhouzam

Nice! Just a quick touch up:

  • Can you squash your commits and write a single commit message that covers this? (if not, I'd be happy to squash / merge and write one)

I've gone ahead and done it myself. Thanks @fnickels for the fix!

marckhouzam avatar Sep 30 '22 18:09 marckhouzam

happy to help

fnickels avatar Oct 01 '22 02:10 fnickels