from fabric.api import local
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
line 9, in <module>
from fabric.context_managers import cd, hide, settings, show,
path, prefix, lcd
line 38, in <module>
from fabric.state import output, win32
line 10, in <module>
from fabric.version import get_version
line 101, in <module>
__version__ = get_version('short')
line 52, in get_version
sha = git_sha()
line 22, in git_sha
line 679, in __init__
line 1228, in _execute_child
OSError: [Errno 2] No such file or directory
This example comes from an Android system lacking pip or git binaries. I believe the error is legit, as we simply call subprocess.Popen("git xxx"), which should AFAIK blow up on any system lacking Git.
Why this didn't come up before now is probably due to the following:
git_sha() or xxx
EDIT: Except that should still result in a shell level error (eg bash: git: file not found) and not OSError -- so this might meant Popen itself cannot open the shell it's trying to use (should be /bin/sh by default). Which makes a lot more sense on Android vs other systems.
bash: git: file not found
Fix should be a simple try/except either way.
Capture version.py OSErrors generated by sh-less systems
local() itself is obviously going to have the same problem...duh!
And there's no graceful workaround for that angle, local simply cannot work in that situation until we tackle #178. Pinning to that guy.
Changelog re #749