summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Voigt <hvoigt@hvoigt.net>2009-09-14 08:49:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-09-14 09:27:25 (GMT)
commit20f34902d154f390ebaa7eed7f42ad14140b8acb (patch)
tree83f5eaeda9af5d0afbdb9159fb3170b5312bd5be
parent39c448c19de7269e6130b6e183645c5b9afe0579 (diff)
downloadgit-20f34902d154f390ebaa7eed7f42ad14140b8acb.zip
git-20f34902d154f390ebaa7eed7f42ad14140b8acb.tar.gz
git-20f34902d154f390ebaa7eed7f42ad14140b8acb.tar.bz2
web--browse: fix Mac OS X GUI detection for 10.6
Since OS X 10.6 the variable $SECURITYSESSIONID does not exist anymore, so lets look for the $TERM_PROGRAM variable as backup. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xgit-web--browse.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-web--browse.sh b/git-web--browse.sh
index 4f5c740..a578c3a 100755
--- a/git-web--browse.sh
+++ b/git-web--browse.sh
@@ -111,7 +111,8 @@ if test -z "$browser" ; then
browser_candidates="w3m links lynx"
fi
# SECURITYSESSIONID indicates an OS X GUI login session
- if test -n "$SECURITYSESSIONID"; then
+ if test -n "$SECURITYSESSIONID" \
+ -o "$TERM_PROGRAM" = "Apple_Terminal" ; then
browser_candidates="open $browser_candidates"
fi
# /bin/start indicates MinGW