Check for git before querying it for a version
* pbr/packaging.py(_get_version_from_git): Wrap calls to _run_git_command in a conditional check for _git_is_installed to avoid an opaque error message which can occur when you have a .git directory but no git executable. Change-Id: I6752c93d393a941daa1e7fb949c7c3d2a75337f3 Closes-Bug: #1326682
This commit is contained in:
parent
a38dc208cf
commit
654191113e
|
@ -801,7 +801,7 @@ def _get_version_from_git(pre_version):
|
|||
"""
|
||||
|
||||
git_dir = _get_git_directory()
|
||||
if git_dir:
|
||||
if git_dir and _git_is_installed():
|
||||
if pre_version:
|
||||
try:
|
||||
return _run_git_command(
|
||||
|
|
Loading…
Reference in New Issue