From 77cc45f425577e7c302ee96e2992276b2070af5f Mon Sep 17 00:00:00 2001 From: Derek DeJonghe Date: Mon, 4 Jun 2018 17:47:51 -0400 Subject: [PATCH] exit 1 if except --- semver/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/semver/__init__.py b/semver/__init__.py index 7f71c44..d0cb2eb 100644 --- a/semver/__init__.py +++ b/semver/__init__.py @@ -111,7 +111,8 @@ class SemVer(object): raise Exception('Not merging into a main branch') if not self.get_version_type(): raise Exception('No git flow branch found') - self.setup_git_user() + if push: + self.setup_git_user() self.version_repo() if push: self.commit_and_push() @@ -125,6 +126,7 @@ def main(): SemVer().run(push=args.push) except Exception as e: print(e) + exit(1) if __name__ == '__main__': try: main()