Skip to content

Commit e2bbfed

Browse files
committed
Merge branch 'jn/maint-instaweb-plack-fix'
* jn/maint-instaweb-plack-fix: git-instaweb: Change how gitweb.psgi is made runnable as standalone app
2 parents 674ef90 + 20e7ab8 commit e2bbfed

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

git-instaweb.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,12 +558,14 @@ my \$app = builder {
558558
559559
# make it runnable as standalone app,
560560
# like it would be run via 'plackup' utility
561-
if (__FILE__ eq \$0) {
561+
if (caller) {
562+
return \$app;
563+
} else {
562564
require Plack::Runner;
563565
564566
my \$runner = Plack::Runner->new();
565567
\$runner->parse_options(qw(--env deployment --port $port),
566-
"$local" ? qw(--host 127.0.0.1) : ());
568+
"$local" ? qw(--host 127.0.0.1) : ());
567569
\$runner->run(\$app);
568570
}
569571
__END__

0 commit comments

Comments
 (0)