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

arg parser: Command name cannot match "full" #36

Open
abdulito opened this issue Jul 27, 2017 · 0 comments
Open

arg parser: Command name cannot match "full" #36

abdulito opened this issue Jul 27, 2017 · 0 comments

Comments

@abdulito
Copy link

abdulito commented Jul 27, 2017

For example

cmdargs: {
  me: {
    command: true,
    full: "me"
 },
...

This will barf on this line

delete commands[fullCommand].full

In this case you would just not specify full and it would work but it took me a while to figure that out since i was copying commands from a template.

TypeError: Cannot convert undefined or null to object
    at Atom._initArgParser (/Users/abdul/github/mlab/mlab-cli/node_modules/@carbon-io/atom/lib/atom.js:620:24)
    at Atom._processCmdargs (/Users/abdul/github/mlab/mlab-cli/node_modules/@carbon-io/atom/lib/atom.js:502:10)
    at Atom._invokeMain (/Users/abdul/github/mlab/mlab-cli/node_modules/@carbon-io/atom/lib/atom.js:412:27)
    at Atom._runMain (/Users/abdul/github/mlab/mlab-cli/node_modules/@carbon-io/atom/lib/atom.js:403:12)
    at Atom._makeObject (/Users/abdul/github/mlab/mlab-cli/node_modules/@carbon-io/atom/lib/atom.js:162:16)
    at Atom.make (/Users/abdul/github/mlab/mlab-cli/node_modules/@carbon-io/atom/lib/atom.js:117:24)
    at /Users/abdul/github/mlab/mlab-cli/node_modules/@carbon-io/atom/lib/atom.js:791:19
    at /Users/abdul/github/mlab/mlab-cli/bin/mlab:8:3
    at fiberFunction (/Users/abdul/github/mlab/mlab-cli/node_modules/@carbon-io/fibers/index.js:219:13)
Exception caught with error undefined in fibers.spawn: TypeError: Cannot convert undefined or null to object
    at Atom._initArgParser (/Users/abdul/github/mlab/mlab-cli/node_modules/@carbon-io/atom/lib/atom.js:620:24)
    at Atom._processCmdargs (/Users/abdul/github/mlab/mlab-cli/node_modules/@carbon-io/atom/lib/atom.js:502:10)
    at Atom._invokeMain (/Users/abdul/github/mlab/mlab-cli/node_modules/@carbon-io/atom/lib/atom.js:412:27)
    at Atom._runMain (/Users/abdul/github/mlab/mlab-cli/node_modules/@carbon-io/atom/lib/atom.js:403:12)
    at Atom._makeObject (/Users/abdul/github/mlab/mlab-cli/node_modules/@carbon-io/atom/lib/atom.js:162:16)
    at Atom.make (/Users/abdul/github/mlab/mlab-cli/node_modules/@carbon-io/atom/lib/atom.js:117:24)
    at /Users/abdul/github/mlab/mlab-cli/node_modules/@carbon-io/atom/lib/atom.js:791:19
    at /Users/abdul/github/mlab/mlab-cli/bin/mlab:8:3
    at fiberFunction (/Users/abdul/github/mlab/mlab-cli/node_modules/@carbon-io/fibers/index.js:219:13)

This is because delete commands[fullCommand] attempts to delete an entry that doesn't exist anymore since it was deleted by delete commands[command]

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

No branches or pull requests

1 participant