Skip to content

Commit

Permalink
Fix git path search in query_version_info.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mastersin committed Jan 5, 2019
1 parent 2f27d04 commit c48aa83
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/query_version_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,18 @@ def _add_path_env(value):
os.environ['PATH'] = new_path


GIT_FOUND = False

for path_variant in GIT_PATH_SEARCH:
candidate = path_variant + os.path.sep + "git"
if "nt" == os.name:
candidate += ".exe"
if os.path.exists(candidate):
_add_path_env(path_variant)
GIT_FOUND = True
break

if not GIT_FOUND:
sys.stderr.write("Git executable not found!\n")
sys.exit(1)

Expand Down

0 comments on commit c48aa83

Please sign in to comment.