diff options
author | Heiko Voigt <hvoigt@hvoigt.net> | 2009-09-14 10:49:01 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-09-14 02:27:25 -0700 |
commit | 20f34902d154f390ebaa7eed7f42ad14140b8acb (patch) | |
tree | 83f5eaeda9af5d0afbdb9159fb3170b5312bd5be | |
parent | remove logical typo in documentation of sample update hook (diff) | |
download | tgif-20f34902d154f390ebaa7eed7f42ad14140b8acb.tar.xz |
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>
-rwxr-xr-x | git-web--browse.sh | 3 |
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 |