summaryrefslogtreecommitdiff
path: root/git-web--browse.sh
diff options
context:
space:
mode:
authorHeiko Voigt <hvoigt@hvoigt.net>2009-09-14 10:49:01 +0200
committerJunio C Hamano <gitster@pobox.com>2009-09-14 02:27:25 -0700
commit20f34902d154f390ebaa7eed7f42ad14140b8acb (patch)
tree83f5eaeda9af5d0afbdb9159fb3170b5312bd5be /git-web--browse.sh
parent39c448c19de7269e6130b6e183645c5b9afe0579 (diff)
downloadgit-20f34902d154f390ebaa7eed7f42ad14140b8acb.tar.gz
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>
Diffstat (limited to 'git-web--browse.sh')
-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 4f5c740df5..a578c3a732 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