mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
nix build: find() -> get()
find() returns an iterator so "!attr" doesn't work.
This commit is contained in:
parent
649d3aaf24
commit
958bf57123
1 changed files with 2 additions and 2 deletions
|
@ -98,14 +98,14 @@ struct CmdBundle : InstallableCommand
|
||||||
if (!evalState->isDerivation(*vRes))
|
if (!evalState->isDerivation(*vRes))
|
||||||
throw Error("the bundler '%s' does not produce a derivation", bundler.what());
|
throw Error("the bundler '%s' does not produce a derivation", bundler.what());
|
||||||
|
|
||||||
auto attr1 = vRes->attrs->find(evalState->sDrvPath);
|
auto attr1 = vRes->attrs->get(evalState->sDrvPath);
|
||||||
if (!attr1)
|
if (!attr1)
|
||||||
throw Error("the bundler '%s' does not produce a derivation", bundler.what());
|
throw Error("the bundler '%s' does not produce a derivation", bundler.what());
|
||||||
|
|
||||||
PathSet context2;
|
PathSet context2;
|
||||||
StorePath drvPath = store->parseStorePath(evalState->coerceToPath(*attr1->pos, *attr1->value, context2));
|
StorePath drvPath = store->parseStorePath(evalState->coerceToPath(*attr1->pos, *attr1->value, context2));
|
||||||
|
|
||||||
auto attr2 = vRes->attrs->find(evalState->sOutPath);
|
auto attr2 = vRes->attrs->get(evalState->sOutPath);
|
||||||
if (!attr2)
|
if (!attr2)
|
||||||
throw Error("the bundler '%s' does not produce a derivation", bundler.what());
|
throw Error("the bundler '%s' does not produce a derivation", bundler.what());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue