Don't fall thru to Hydra::View::NARInfo

This caused exceptions like:

  Caught exception in Hydra::Controller::Build->view_build "writing to file: Broken pipe at /nix/store/ihdb3widsq1dk7sbl5vqjxfcxb5ypad4-hydra-0.1pre1297-8158093/libexec/hydra/lib/Hydra/Controller/Build.pm line 59."

because the connection to the Nix daemon would be terminated due to a
protocol violation (calling queryPathInfo with an empty string).
This commit is contained in:
Eelco Dolstra 2013-04-30 16:23:19 +02:00
parent 45a1bb9926
commit 3003bb1c99

View file

@ -225,8 +225,9 @@ sub narinfo :LocalRegex('^([a-z0-9]+).narinfo$') :Args(0) {
$c->response->content_type('text/plain');
$c->stash->{plain}->{data} = "does not exist\n";
$c->forward('Hydra::View::Plain');
return;
}
$c->stash->{storePath} = $path;
$c->forward('Hydra::View::NARInfo');
}