Skip to content

Commit f0769c5

Browse files
committed
Get proper path to app when run under test harness.
1 parent 4a9bca6 commit f0769c5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app.psgi

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,14 @@ my $app = Plack::App::URLMap->new;
5151
{
5252
my $core_app = MetaCPAN::Web->psgi_app;
5353

54+
my $path
55+
= $ENV{HARNESS_ACTIVE}
56+
? q{./}
57+
: $FindBin::RealBin;
58+
5459
my $config = Config::JFDI->new(
5560
name => 'MetaCPAN::Web',
56-
path => $FindBin::RealBin,
61+
path => $path,
5762
);
5863

5964
die 'cookie_secret not configured' unless $config->get->{cookie_secret};

0 commit comments

Comments
 (0)