hydra-eval-{jobs,jobset}: Pass file name as <...>

This commit is contained in:
Eelco Dolstra 2017-11-28 16:51:00 +01:00
parent b7bc4384b7
commit 364e21919a
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
2 changed files with 7 additions and 4 deletions

View file

@ -175,7 +175,7 @@ int main(int argc, char * * argv)
else if (*arg != "" && arg->at(0) == '-')
return false;
else
releaseExpr = absPath(*arg);
releaseExpr = *arg;
return true;
});
@ -197,7 +197,7 @@ int main(int argc, char * * argv)
Bindings & autoArgs = *myArgs.getAutoArgs(state);
Value v;
state.evalFile(releaseExpr, v);
state.evalFile(lookupFileArg(state, releaseExpr), v);
JSONObject json(std::cout, true);
findJobs(state, json, autoArgs, v, "");

View file

@ -358,11 +358,14 @@ sub evalJobs {
or die "cannot find the input containing the job expression\n";
die "multiple alternatives for the input containing the Nix expression are not supported.\n"
if scalar @{$inputInfo->{$nixExprInputName}} != 1;
my $nixExprFullPath = $nixExprInput->{storePath} . "/" . $nixExprPath;
my $evaluator = ($exprType eq "guile") ? "hydra-eval-guile-jobs" : "hydra-eval-jobs";
my @cmd = ($evaluator, $nixExprFullPath, "--gc-roots-dir", getGCRootsDir, "-j", 1, inputsToArgs($inputInfo, $exprType));
my @cmd = ($evaluator,
"<" . $nixExprInputName . "/" . $nixExprPath . ">",
"--gc-roots-dir", getGCRootsDir,
"-j", 1,
inputsToArgs($inputInfo, $exprType));
if (defined $ENV{'HYDRA_DEBUG'}) {
sub escape {