diff options
| author | Junio C Hamano <gitster@pobox.com> | 2011-04-03 12:30:58 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2011-04-03 12:30:58 -0700 |
| commit | 7a4750a578ac9e32968a9186986169bc56d05ddb (patch) | |
| tree | 5193415679b7742f8c4986dfe1ba8c4cc81691ec | |
| parent | Merge branch 'lp/config-vername-check' into maint (diff) | |
| parent | git-instaweb: Change how gitweb.psgi is made runnable as standalone app (diff) | |
| download | git-7a4750a578ac9e32968a9186986169bc56d05ddb.tar.gz git-7a4750a578ac9e32968a9186986169bc56d05ddb.zip | |
Merge branch 'jn/maint-instaweb-plack-fix' into maint
* jn/maint-instaweb-plack-fix:
git-instaweb: Change how gitweb.psgi is made runnable as standalone app
| -rwxr-xr-x | git-instaweb.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/git-instaweb.sh b/git-instaweb.sh index 10fcebb119..8bfa8a055c 100755 --- a/git-instaweb.sh +++ b/git-instaweb.sh @@ -558,12 +558,14 @@ my \$app = builder { # make it runnable as standalone app, # like it would be run via 'plackup' utility -if (__FILE__ eq \$0) { +if (caller) { + return \$app; +} else { require Plack::Runner; my \$runner = Plack::Runner->new(); \$runner->parse_options(qw(--env deployment --port $port), - "$local" ? qw(--host 127.0.0.1) : ()); + "$local" ? qw(--host 127.0.0.1) : ()); \$runner->run(\$app); } __END__ |
