-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
npm version --no-git-tag-version --verbose should not log git error #263
Conversation
Hm, this bit of code looks a bit odd to me. It probably needs a more thorough review at some point. You're right, it's a bit weird that we stat the git folder in that case just to log a verbose message saying that we're not doing anything with it. It would be good to keep the verbose log, but without the stat, if I'm inclined to punt on this until we have some time to dig deeper into the issue. Would it be terrible to just run without |
That's indeed the route we're currently on, but in the mean time we want to be able to track this issue somewhere so that we can point at an issue or PR. I totally agree that this code looks a bit weird (not only my "fix" but _commit as well as you say). What would be the proper way to make sure that this gets fixed at some point? I could dig a bit deeper myself and make a more complete solution of course. |
We can just leave this open, it's fine. We may decide to take this change (or something like it), but I'd like to have a bit of time to track through the logic and make sure we're not causing other problems. (All too often I've found, when making a seemingly reasonable change in strange-seeming code, the results are strange and unexpected.) |
PR-URL: #263 Credit: @woppa684 Close: #263 Reviewed-by: @mikemimik
When npm version is run with both the
--no-git-tag-version
and--verbose
flags, it logs an error if it cannot find a.git
folder in the current folder. This error is very annoying for our automated build tooling and seems not relevant in the case that I don't want to update git.Example of the error:
Expected output:
This PR just prevents the error from being logged. Of course another option would be to skip the statGitFolder altogether...