summaryrefslogtreecommitdiff
path: root/git-instaweb.sh
diff options
context:
space:
mode:
authorChris Webb <chris@arachsys.com>2010-04-15 14:29:45 +0100
committerJunio C Hamano <gitster@pobox.com>2010-04-17 12:40:20 -0700
commit39407304f11b4ae1977acd9875b9b8540bff2874 (patch)
tree3ad25d1929af307980ad0c081a776a06d8a2528b /git-instaweb.sh
parent8de096b6718048e84ee88e604a94b22937a0758e (diff)
downloadgit-39407304f11b4ae1977acd9875b9b8540bff2874.tar.gz
git-instaweb: pass through invoking user's path to gitweb CGI scripts
When used with lighttpd or mongoose, git-instaweb previously passed a hard-coded, default value of PATH to the gitweb CGI script. Use the invoking user's value for PATH for this instead. (This is already implicitly the behaviour for other web servers supported by git-instaweb.) Signed-off-by: Chris Webb <chris@arachsys.com> Acked-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'git-instaweb.sh')
-rwxr-xr-xgit-instaweb.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-instaweb.sh b/git-instaweb.sh
index d4941a9ce6..f6080149c2 100755
--- a/git-instaweb.sh
+++ b/git-instaweb.sh
@@ -212,7 +212,7 @@ server.errorlog = "$fqgitdir/gitweb/error.log"
# variable above and uncomment this
#accesslog.filename = "$fqgitdir/gitweb/access.log"
-setenv.add-environment = ( "PATH" => "/usr/local/bin:/usr/bin:/bin" )
+setenv.add-environment = ( "PATH" => env.PATH )
cgi.assign = ( ".cgi" => "" )
@@ -361,7 +361,7 @@ error_log $fqgitdir/gitweb/error.log
access_log $fqgitdir/gitweb/access.log
#cgi setup
-cgi_env PATH=/usr/local/bin:/usr/bin:/bin,GIT_DIR=$GIT_DIR,GIT_EXEC_PATH=$GIT_EXEC_PATH
+cgi_env PATH=$PATH,GIT_DIR=$GIT_DIR,GIT_EXEC_PATH=$GIT_EXEC_PATH
cgi_interp $PERL
cgi_ext cgi,pl