From 5af551c96d88d88c5cc262de68e03d52e0b6149b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 19 Jan 2019 12:36:34 +0530 Subject: [PATCH] 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. --- kittens/diff/patch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kittens/diff/patch.py b/kittens/diff/patch.py index ebcd9b31d..5acdc2ffe 100644 --- a/kittens/diff/patch.py +++ b/kittens/diff/patch.py @@ -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