Move outputs definition closer to use
This commit is contained in:
parent
08499559fc
commit
f8dad73ac8
|
@ -173,8 +173,6 @@ static void worker(
|
||||||
|
|
||||||
if (auto drv = getDerivation(state, *v, false)) {
|
if (auto drv = getDerivation(state, *v, false)) {
|
||||||
|
|
||||||
DrvInfo::Outputs outputs = drv->queryOutputs();
|
|
||||||
|
|
||||||
if (drv->querySystem() == "unknown")
|
if (drv->querySystem() == "unknown")
|
||||||
throw EvalError("derivation must have a 'system' attribute");
|
throw EvalError("derivation must have a 'system' attribute");
|
||||||
|
|
||||||
|
@ -224,6 +222,7 @@ static void worker(
|
||||||
downloadSize,
|
downloadSize,
|
||||||
narSize);
|
narSize);
|
||||||
|
|
||||||
|
DrvInfo::Outputs outputs = drv->queryOutputs();
|
||||||
nlohmann::json out;
|
nlohmann::json out;
|
||||||
for (auto & p : outputs) {
|
for (auto & p : outputs) {
|
||||||
out[p.first] = p.second;
|
out[p.first] = p.second;
|
||||||
|
|
Loading…
Reference in a new issue