Fix bad wanted output error as requested

- UsageError -> Error

- include drv path too
This commit is contained in:
John Ericson 2021-03-01 15:07:09 +00:00
parent 4bbd80c536
commit 7ce10924c7

View file

@ -1274,7 +1274,9 @@ void DerivationGoal::checkPathValidity()
// If we requested specific elements, the loop above removes all the valid
// ones, so any that are left must be invalid.
if (!wantedOutputsLeft.empty())
throw UsageError("some wanted outputs are not provided by the derivation: %s", concatStringsSep(", ", wantedOutputsLeft));
throw Error("derivation '%s' does not have wanted outputs %s",
worker.store.printStorePath(drvPath),
concatStringsSep(", ", quoteStrings(wantedOutputsLeft)));
}