From 20f34902d154f390ebaa7eed7f42ad14140b8acb Mon Sep 17 00:00:00 2001 From: Heiko Voigt Date: Mon, 14 Sep 2009 10:49:01 +0200 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- git-web--browse.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/git-web--browse.sh b/git-web--browse.sh index 4f5c740df..a578c3a73 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 -- 2.30.2