Commit 20f34902 authored by Heiko Voigt's avatar Heiko Voigt Committed by Junio C Hamano

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's avatarHeiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
parent 39c448c1
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment