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
Executing np --version
tries to execute typical np executiion
#602
Comments
I couldn't reproduce this with either |
@sindresorhus After some digging around, I realized I had an alias for np alias np="np --no-cleanup" So, in affect, this is the actual call (which still has the same issue) $ np --no-cleanup --version
✖ Could not infer the default Git branch. Please specify one with the --branch flag or with a np config. |
Closing this as its unrelated to np. |
@dopecodez but it is related to np. If you call My thinking, any call that has |
This is an intentional feature in It's to make it possible for the auto-help thing to work in CLIs based on One way we could solve this is to allow |
cool, now that i check npm it does seem to use the I agree with how |
I agree with @sindresorhus probably not worth the hassle. It is a rare occurrence when someone would create an alias as I have done, and had it not existed this edge case would not have been found. Perhaps it would be a “feature” to Thank you for your feedback gentleman |
Feel free to open an issue on the |
Description
When executing
np --version
, it seemsnp
is trying to actually run within current directoryThe following example executes
np --version
in a directory which does not have .git initialized, when executing in a typical npm project, it has a different messageSteps to reproduce
np --version
Expected behavior
Show the current
np
version informationEnvironment
np - 7.3.0 (trying to upgrade to 7.4.0)
Node.js - 14.5.0
npm - 7.0.15
Git - 2.30.0
OS - macOS 10.15.7
or, from within a project which has a valid .git project
The text was updated successfully, but these errors were encountered: