Set a default value for `getHydraPath'.

This commit is contained in:
Ludovic Courtès
2011-03-02 15:17:03 +00:00
parent b59ca01e40
commit bf927b3180
3 changed files with 14 additions and 12 deletions

View File

@ -24,9 +24,7 @@ sub isValidPath {
sub getHydraPath {
my $dir = $ENV{"HYDRA_DATA"};
die "The HYDRA_DATA environment variable is not set!\n" unless defined $dir;
die "The HYDRA_DATA directory does not exist!\n" unless -d $dir;
my $dir = $ENV{"HYDRA_DATA"} || "@localstatedir@/lib/hydra";
return $dir;
}