rsgalloway / distman

super simple file distribution system
1 stars 0 forks source link

ImportError: Bad git executable #11

Open rsgalloway opened 2 days ago

rsgalloway commented 2 days ago

Do we need to wrap the git import in a try/except? What if git is not installed, or is not in $PATH? (it's possible envstack could mess up $PATH if misconfigured)

Traceback (most recent call last):
  File ".../envstack/venv3/lib/python3.8/site-packages/git/__init__.py", line 296, in <module>
    refresh()
  File ".../envstack/venv3/lib/python3.8/site-packages/git/__init__.py", line 287, in refresh
    if not Git.refresh(path=path):
  File ".../envstack/venv3/lib/python3.8/site-packages/git/cmd.py", line 631, in refresh
    raise ImportError(err)
ImportError: Bad git executable.
The git executable must be specified in one of the following ways:
    - be included in your $PATH
    - be set via $GIT_PYTHON_GIT_EXECUTABLE
    - explicitly set via git.refresh(<full-path-to-git-executable>)

All git commands will error until this is rectified.

This initial message can be silenced or aggravated in the future by setting the
$GIT_PYTHON_REFRESH environment variable. Use one of the following values:
    - quiet|q|silence|s|silent|none|n|0: for no message or exception
    - warn|w|warning|log|l|1: for a warning message (logging level CRITICAL, displayed by default)
    - error|e|exception|raise|r|2: for a raised exception

Example:
    export GIT_PYTHON_REFRESH=quiet