diff --git a/src/lib/Hydra/Helper/AddBuilds.pm b/src/lib/Hydra/Helper/AddBuilds.pm index 416aa2b0..5d72e7a7 100644 --- a/src/lib/Hydra/Helper/AddBuilds.pm +++ b/src/lib/Hydra/Helper/AddBuilds.pm @@ -107,13 +107,17 @@ sub fetchInputBuild { my $mainOutput = getMainOutput($prevBuild); - return + my $result = { storePath => $mainOutput->path , id => $prevBuild->id , version => $version , outputName => $mainOutput->name - , drvPath => $prevBuild->drvPath }; + if (isValidPath($prevBuild->drvPath)) { + $input->{drvPath} = $prevBuild->drvPath; + } + + return $result; }