mirror of
https://github.com/NixOS/nix
synced 2025-06-25 23:11:16 +02:00
Add detailed error mesage for coerceTo{String,Path}
This commit is contained in:
parent
be1f069746
commit
3a5855353e
14 changed files with 79 additions and 66 deletions
|
@ -125,7 +125,7 @@ static void fetchTree(
|
|||
if (attr.name == state.sType) continue;
|
||||
state.forceValue(*attr.value, *attr.pos);
|
||||
if (attr.value->type() == nPath || attr.value->type() == nString) {
|
||||
auto s = state.coerceToString(*attr.pos, *attr.value, context, false, false).toOwned();
|
||||
auto s = state.coerceToString(*attr.pos, *attr.value, context, false, false, "").toOwned();
|
||||
attrs.emplace(attr.name,
|
||||
attr.name == "url"
|
||||
? type == "git"
|
||||
|
@ -151,7 +151,7 @@ static void fetchTree(
|
|||
|
||||
input = fetchers::Input::fromAttrs(std::move(attrs));
|
||||
} else {
|
||||
auto url = state.coerceToString(pos, *args[0], context, false, false).toOwned();
|
||||
auto url = state.coerceToString(pos, *args[0], context, false, false, "While evaluating the first argument passed to the fetcher").toOwned();
|
||||
|
||||
if (type == "git") {
|
||||
fetchers::Attrs attrs;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue