aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormduigou <none@none>2013-04-01 21:11:51 -0700
committermduigou <none@none>2013-04-01 21:11:51 -0700
commitc160fe989271bf3ff00b61ffa01c8ae6f71e07c7 (patch)
treed3efc03b3560bd68f51f005a7e7d6542d4c55656
parentce43867f2ddd14e83475c4700ba0c2c9ac670d6c (diff)
8011178: improve common/bin/hgforest.sh python detection (MacOS)
Reviewed-by: ohair
-rw-r--r--common/bin/hgforest.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/bin/hgforest.sh b/common/bin/hgforest.sh
index 9f0db97..4c97753 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.