Skip to content

Commit 20f3490

Browse files
hvoigtgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 39c448c commit 20f3490

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

git-web--browse.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ if test -z "$browser" ; then
111111
browser_candidates="w3m links lynx"
112112
fi
113113
# 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
115116
browser_candidates="open $browser_candidates"
116117
fi
117118
# /bin/start indicates MinGW

0 commit comments

Comments
 (0)