mirror of
https://github.com/NixOS/nix.git
synced 2024-11-26 16:52:27 +00:00
fetchTree: Support integer attributes
This commit is contained in:
parent
12f9379123
commit
6cf91d6fbd
@ -61,8 +61,10 @@ static void prim_fetchTree(EvalState & state, const Pos & pos, Value * * args, V
|
|||||||
attrs.emplace(attr.name, attr.value->string.s);
|
attrs.emplace(attr.name, attr.value->string.s);
|
||||||
else if (attr.value->type == tBool)
|
else if (attr.value->type == tBool)
|
||||||
attrs.emplace(attr.name, attr.value->boolean);
|
attrs.emplace(attr.name, attr.value->boolean);
|
||||||
|
else if (attr.value->type == tInt)
|
||||||
|
attrs.emplace(attr.name, attr.value->integer);
|
||||||
else
|
else
|
||||||
throw TypeError("fetchTree argument '%s' is %s while a string or Boolean is expected",
|
throw TypeError("fetchTree argument '%s' is %s while a string, Boolean or integer is expected",
|
||||||
attr.name, showType(*attr.value));
|
attr.name, showType(*attr.value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user