Skip to content

Commit

Permalink
web--browse: fix Mac OS X GUI detection for 10.6
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiko Voigt authored and Junio C Hamano committed Sep 14, 2009
1 parent 39c448c commit 20f3490
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion git-web--browse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 20f3490

Please sign in to comment.