Add detailed error mesage for coerceTo{String,Path}

This commit is contained in:
Guillaume Maudoux
2022-03-04 21:47:58 +01:00
parent be1f069746
commit 3a5855353e
14 changed files with 79 additions and 66 deletions
+2 -2
View File
@@ -97,13 +97,13 @@ struct CmdBundle : InstallableCommand
throw Error("the bundler '%s' does not produce a derivation", bundler.what());
PathSet context2;
auto drvPath = evalState->coerceToStorePath(*attr1->pos, *attr1->value, context2);
auto drvPath = evalState->coerceToStorePath(*attr1->pos, *attr1->value, context2, "");
auto attr2 = vRes->attrs->get(evalState->sOutPath);
if (!attr2)
throw Error("the bundler '%s' does not produce a derivation", bundler.what());
auto outPath = evalState->coerceToStorePath(*attr2->pos, *attr2->value, context2);
auto outPath = evalState->coerceToStorePath(*attr2->pos, *attr2->value, context2, "");
store->buildPaths({ DerivedPath::Built { drvPath } });