-
Notifications
You must be signed in to change notification settings - Fork 80
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
Leave as-is crashes - exit code 1 #35
Comments
Seems that this is still an issue: I believe it's caused by the lack of checking which choice was made when selecting a version, as processing just continues here: version-bump-prompt/src/version-bump.ts Lines 61 to 68 in 19cce02
The versioning choice should be checked, and operations like git etc. should be skipped, in my opinion. Of course leave-as-is will always have such an issue with git as tags will always exist.. so the only option I believe is to skip these calls. |
The "leave as is" option was added because some people wanted Version Bump Prompt to do all the other stuff that it normally does (update other files, git commit, tag, push, etc.) even if the version number didn't change. That's why none of that stuff gets skipped when "leave as is" is selected. I think the right workaround here is to add code to run "git status" first before running "git commit". If "git status" indicates that there are no changed files, then "git commit" would be skipped. |
Also good to check if the current commit is tagged, perhaps |
When choosing an existing version (leave as-is in the menu) the app crashes as Git fails to commit without any changes:
In this case, version
0.2.0
has already been released and I simply wanted to leave the version as-is during deployment to another location.Suggested fix: If a user selects leave-as-is, all other operations should be bypassed (git etc.) - Maybe
process.exit(0)
?The text was updated successfully, but these errors were encountered: