@matheusbsbs / matheus-bagliano / commits / 20f34902d1
Fork 0

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>

Heiko Voigt committed Sep 14, 2009 at 10:49 UTC 20f34902d154f390ebaa7eed7f42ad14140b8acb
1 file changed +2 -1
git-web--browse.sh
+2 -1
@@ -111,7 +111,8 @@ if test -z "$browser" ; then
111 browser_candidates="w3m links lynx"
112 fi
113 # SECURITYSESSIONID indicates an OS X GUI login session
114 - if test -n "$SECURITYSESSIONID"; then
114 + if test -n "$SECURITYSESSIONID" \
115 + -o "$TERM_PROGRAM" = "Apple_Terminal" ; then
116 browser_candidates="open $browser_candidates"
117 fi
118 # /bin/start indicates MinGW