summaryrefslogtreecommitdiffstats
path: root/src/libexpr/primops/fetchTree.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-04-02 16:51:56 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-04-02 16:51:56 +0200
commit6cf91d6fbd65d847c1c4a55b4745c1b5f4a7ee9e (patch)
treeccd2f7b5a8ab050b68a547903dd9da01cad696e1 /src/libexpr/primops/fetchTree.cc
parent12f9379123eba828f2ae06f7978a37b7045c2b23 (diff)
fetchTree: Support integer attributes
Diffstat (limited to 'src/libexpr/primops/fetchTree.cc')
-rw-r--r--src/libexpr/primops/fetchTree.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libexpr/primops/fetchTree.cc b/src/libexpr/primops/fetchTree.cc
index 035586c25..79ddc45f5 100644
--- a/src/libexpr/primops/fetchTree.cc
+++ b/src/libexpr/primops/fetchTree.cc
@@ -61,8 +61,10 @@ static void prim_fetchTree(EvalState & state, const Pos & pos, Value * * args, V
attrs.emplace(attr.name, attr.value->string.s);
else if (attr.value->type == tBool)
attrs.emplace(attr.name, attr.value->boolean);
+ else if (attr.value->type == tInt)
+ attrs.emplace(attr.name, attr.value->integer);
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));
}