macOS: Fix detection of differ

There can be a wrapper git on macOS that complains about command line
tools installation, so check that passing --help to it actually works.
This commit is contained in:
Kovid Goyal
2019-01-19 12:36:34 +05:30
parent 6761fdca1a
commit 5af551c96d

View File

@@ -18,7 +18,7 @@ worker_processes = []
def find_differ():
if shutil.which('git'):
if shutil.which('git') and subprocess.Popen(['git', '--help']).wait() == 0:
return GIT_DIFF
if shutil.which('diff'):
return DIFF_DIFF