Skip to content

Leave as-is crashes - exit code 1 #35

Description

@perry-mitchell

When choosing an existing version (leave as-is in the menu) the app crashes as Git fails to commit without any changes:

$ bump prompt --commit --tag --push --preid r

?
The current version in package.json is 0.2.0
How would you like to bump it? leave as-is (0.2.0)
ℹ package.json did not need to be updated
ℹ package-lock.json did not need to be updated
git commit --message "release v0.2.0" exited with a status of 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-app@0.2.0 bump: `bump prompt --commit --tag --push --preid r`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-app@0.2.0 bump script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/x/.npm/_logs/2019-11-15T11_33_15_429Z-debug.log
ERROR: "bump" exited with 1.

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)?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions