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

No info on typo in command #1098

Closed
hon2a opened this issue Nov 1, 2017 · 2 comments · Fixed by #1140
Closed

No info on typo in command #1098

hon2a opened this issue Nov 1, 2017 · 2 comments · Fixed by #1140

Comments

@hon2a
Copy link

hon2a commented Nov 1, 2017

Some context: I've just upgraded NodeJS, Npm, and Lerna, so I was expecting all sorts of trouble.

I've just spent the last 20 minutes the silliest way. I tried to do a clean lerna bootstrap --scope package-name in my repo and when I ran the command, nothing happened. (Nothing whatsoever, it just immediately returned.) After looking at various things and some googling, I discovered that I just made a typo in the command and wrote lerna boostrap --scope package-name.

Expected Behavior

I'd be nice to be told that no valid command was passed to lerna when that happens.

Current Behavior

Immediate return with no output.

Possible Solution

It'd be helpful for lerna to emit some sort of basic command list (like other apps) when no valid command is passed to it.

Your Environment

Executable Version
lerna --version 2.4.0
npm --version 5.5.1
yarn --version N/A
node --version v8.9.0
OS Version
Windows 7 SP1
@evocateur
Copy link
Member

Indeed, we tried to enable the strict yargs config, which would throw errors in this situation, but we ran into other problems when that was enabled (mostly due to how we allow unrecognized parameters to pass through to the wrapped command for lerna exec and lerna run).

I appreciate the well-written issue, and support any PR to improve this experience. A "did you mean?" error output would be super cool, but even a "default" command that indicates you done goofed and outputs the existing help would be an improvement.

@lock
Copy link

lock bot commented Dec 27, 2018

This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 27, 2018
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 a pull request may close this issue.

2 participants