Skip to content
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

bumpversion crash when mercurial (hg) is not installed #160

Open
dankeder opened this issue May 2, 2017 · 2 comments
Open

bumpversion crash when mercurial (hg) is not installed #160

dankeder opened this issue May 2, 2017 · 2 comments

Comments

@dankeder
Copy link

dankeder commented May 2, 2017

Description

Bumpversion crashes when Mercurial is not installed (there's no command hg in $PATH).

How to reproduce

» bumpversion                                                                                                                                                                                                                                                        
Traceback (most recent call last):
  File "/home/dan/programs/python36-env/bin/bumpversion", line 11, in <module>
    sys.exit(main())
  File "/home/dan/programs/python36-env/lib/python3.6/site-packages/bumpversion/__init__.py", line 658, in main
    if vcs.is_usable():
  File "/home/dan/programs/python36-env/lib/python3.6/site-packages/bumpversion/__init__.py", line 83, in is_usable
    stdout=subprocess.PIPE
  File "/usr/lib64/python3.6/subprocess.py", line 267, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib64/python3.6/subprocess.py", line 707, in __init__
    restore_signals, start_new_session)
  File "/usr/lib64/python3.6/subprocess.py", line 1326, in _execute_child
    raise child_exception_type(errno_num, err_msg)
PermissionError: [Errno 13] Permission denied

Expected behaviour

Bumpversion should continue with the next VCS backend. If no VCS is detected it should report this fact to the user.

Update: It only happens with python3. In python2, it works.

@lowell80
Copy link

lowell80 commented Jun 6, 2019

I encountered and fixed the same issue on my local system. See #204 for a fix.

BTW. I experienced this issue on Python 2.7 on Linux.

@lowell80
Copy link

Since this repo seems to be no longer maintained; I submitted the same fix to the bump2version team over at https://github.com/c4urself/bump2version/. Prior to this I didn't realize a fork had occurred. Note that both are available as bumpversion on the CLI, so it's a drop-in replacement.

Hopefully this note saves someone else some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants