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

Misleading usage information shows up as part of test snapshots #29

Closed
jamesgeorge007 opened this issue Oct 6, 2019 · 5 comments · Fixed by #32
Closed

Misleading usage information shows up as part of test snapshots #29

jamesgeorge007 opened this issue Oct 6, 2019 · 5 comments · Fixed by #32
Assignees
Labels
bug Something isn't working good first issue Good for newcomers Hacktoberfest help wanted Extra attention is needed
Projects

Comments

@jamesgeorge007
Copy link
Member

## shows up help message without any args

> Snapshot 1

    `Usage: index <command> [options]␊

    Options:␊
      -V, --version    output the version number␊
      -h, --help       output usage information␊

    Commands:␊
      init             Initialize challenges␊
      submit           Submits current task␊
      fetchtask <key>  Fetches any task as per the key supplied␊
      showkeys         Shows keys of all the completed tasks␊
      showcommands     Shows all commands available`

What intended instead :-

Usage: teachcode <command> [options]␊

@jamesgeorge007 jamesgeorge007 added bug Something isn't working good first issue Good for newcomers Hacktoberfest help wanted Extra attention is needed labels Oct 6, 2019
@jamesgeorge007 jamesgeorge007 added this to To do in Roadmap via automation Oct 6, 2019
@jamesgeorge007
Copy link
Member Author

diff --git a/bin/index.js b/bin/index.js
index ee669dd..bf06feb 100755
--- a/bin/index.js
+++ b/bin/index.js
@@ -14,7 +14,10 @@ const showKeys = require('../src/commands/keys');
 const submitTask = require('../src/commands/submit');
 
 // Defining all the available commands
-program.version(version).usage('<command> [options]');
+program
+  .name('teachcode')
+  .version(version)
+  .usage('<command> [options]');
 
 program
   .command('init')

@himankpathak
Copy link
Contributor

Hi @jamesgeorge007, is this issue already resolved?

@jamesgeorge007
Copy link
Member Author

@himankpathak nope, feel free to shoot a PR 👍

@himankpathak
Copy link
Contributor

himankpathak commented Oct 6, 2019

Hey, I made the changes should I create the PR for next branch or master branch?

@jamesgeorge007
Copy link
Member Author

jamesgeorge007 commented Oct 6, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers Hacktoberfest help wanted Extra attention is needed
Projects
Roadmap
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants