Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

bugfix: duplicate help command #197

Merged
merged 2 commits into from Dec 5, 2018
Merged

Conversation

jakebolam
Copy link
Contributor

Description

Before:

    set-default <version>     Sets the default fallback yarn version, if not supplied and no .yvmrc found
    get-default-version       Gets the default set yarn version
    version                   Outputs the version of yvm that is installed
    update-self               Updates yvm to the latest version
    help                      Show help text
    help [cmd]                display help for [cmd]

screen shot 2018-12-04 at 6 21 11 pm

After:

    set-default <version>     Sets the default fallback yarn version, if not supplied and no .yvmrc found
    get-default-version       Gets the default set yarn version
    version                   Outputs the version of yvm that is installed
    update-self               Updates yvm to the latest version
    help                      Show help text

@brandonbaksh
Copy link
Contributor

brandonbaksh commented Dec 5, 2018

@jakebolam I guess we have "two" usages for the help command.

  1. yvm
  • This should output the list of commands (just like a help page)
  1. yvm help
  • This should do the same thing as 1)

I think with your changes it invalidates 2).

See the screenshot below:
screen shot 2018-12-05 at 10 33 19 am

Notice it says Invalid help command for yvm help

I think in general we want to be able to support both 1) and 2) and have them both display the exact same response.

Also the usage of yvm help [cmd] is pretty confusing. For example, doing something like yvm help list, I would expect to get some help docs on how the list command works. Instead I get the message Invalid help command since the 2nd argument is #FAKENEWS

@jakebolam
Copy link
Contributor Author

@brandonbaksh that yvm help invalid command is a tricky one
as for the confusing output of help [cmd] this is recently coming from a new version fo commander.
Looking at there docs/github there is no current way to disabled it. May need to put a PR up on there side. (Added an issue: tj/commander.js#892)

@jakebolam jakebolam merged commit 95b8c23 into master Dec 5, 2018
@jakebolam jakebolam deleted the bugfix/duplicate-help-command branch December 5, 2018 20:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants