nix-eval-jobs: Remove Value default construction from releaseExprTopLevelValue
Change-Id: I7461323771a50729c66d9e3160c4768f6a6a6964
This commit is contained in:
@@ -45,17 +45,18 @@
|
||||
static nix::Value releaseExprTopLevelValue(nix::EvalState &state,
|
||||
nix::Bindings &autoArgs,
|
||||
MyArgs &args) {
|
||||
nix::Value vTop;
|
||||
|
||||
nix::Value vTop = [&]() {
|
||||
if (args.fromArgs) {
|
||||
nix::Expr &e = state.ctx.parseExprFromString(args.releaseExpr,
|
||||
nix::CanonPath::fromCwd());
|
||||
vTop = state.eval(e);
|
||||
nix::Expr &e = state.ctx.parseExprFromString(
|
||||
args.releaseExpr, nix::CanonPath::fromCwd());
|
||||
return state.eval(e);
|
||||
} else {
|
||||
vTop = state.evalFile(
|
||||
state.aio.blockOn(nix::lookupFileArg(state.ctx, args.releaseExpr))
|
||||
return state.evalFile(
|
||||
state.aio
|
||||
.blockOn(nix::lookupFileArg(state.ctx, args.releaseExpr))
|
||||
.unwrap());
|
||||
}
|
||||
}();
|
||||
|
||||
return state.autoCallFunction(autoArgs, vTop, {});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user