From 01ab1da0581f8fa4ead09e4a1c0bcf2600509dc9 Mon Sep 17 00:00:00 2001 From: Mike Duigou Date: Mon, 1 Apr 2013 21:11:51 -0700 Subject: [PATCH] 8011178: improve common/bin/hgforest.sh python detection (MacOS) Reviewed-by: ohair --- common/bin/hgforest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/bin/hgforest.sh b/common/bin/hgforest.sh index 9f0db97d578..4c977532e47 100644 --- a/common/bin/hgforest.sh +++ b/common/bin/hgforest.sh @@ -51,7 +51,7 @@ if [ "#!" = "$has_hash_bang" ] ; then bpython="`basename "$python"`" fi -if [ "python" = "$bpython" -a -x "$python" ] ; then +if [ -x "$python" -a ! -d "$python" -a "`${python} --version 2>&1 | cut -f 1 -d " "`" == "Python" ] ; then hg="${python} -u ${whichhg}" else echo Cannot find python from hg launcher. Running plain hg, which probably has buffered stdout.