Skip to content

Commit 3940730

Browse files
arachsysgitster
authored andcommitted
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 <[email protected]> Acked-by: Eric Wong <[email protected]>
1 parent 8de096b commit 3940730

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-instaweb.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ server.errorlog = "$fqgitdir/gitweb/error.log"
212212
# variable above and uncomment this
213213
#accesslog.filename = "$fqgitdir/gitweb/access.log"
214214
215-
setenv.add-environment = ( "PATH" => "/usr/local/bin:/usr/bin:/bin" )
215+
setenv.add-environment = ( "PATH" => env.PATH )
216216
217217
cgi.assign = ( ".cgi" => "" )
218218
@@ -361,7 +361,7 @@ error_log $fqgitdir/gitweb/error.log
361361
access_log $fqgitdir/gitweb/access.log
362362
363363
#cgi setup
364-
cgi_env PATH=/usr/local/bin:/usr/bin:/bin,GIT_DIR=$GIT_DIR,GIT_EXEC_PATH=$GIT_EXEC_PATH
364+
cgi_env PATH=$PATH,GIT_DIR=$GIT_DIR,GIT_EXEC_PATH=$GIT_EXEC_PATH
365365
cgi_interp $PERL
366366
cgi_ext cgi,pl
367367

0 commit comments

Comments
 (0)