aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops/fetchClosure.cc
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2023-01-18 01:19:07 +0100
committerRobert Hensing <robert@roberthensing.nl>2023-01-18 01:34:07 +0100
commit9b33ef3879a764bed4cc2404a08344c3a697a646 (patch)
treed6921123c18a9077d2f897999e3a1445d1738502 /src/libexpr/primops/fetchClosure.cc
parent98f57f44bbeca3b555bd732771eac4c07d54576b (diff)
Revert "Merge pull request #6204 from layus/coerce-string"
This reverts commit a75b7ba30f1e4f8b15e810fd18e63ee9552e0815, reversing changes made to 9af16c5f742300e831a2cc400e43df1e22f87f31.
Diffstat (limited to 'src/libexpr/primops/fetchClosure.cc')
-rw-r--r--src/libexpr/primops/fetchClosure.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/libexpr/primops/fetchClosure.cc b/src/libexpr/primops/fetchClosure.cc
index 0dfa97fa3..662c9652e 100644
--- a/src/libexpr/primops/fetchClosure.cc
+++ b/src/libexpr/primops/fetchClosure.cc
@@ -7,7 +7,7 @@ namespace nix {
static void prim_fetchClosure(EvalState & state, const PosIdx pos, Value * * args, Value & v)
{
- state.forceAttrs(*args[0], pos, "while evaluating the argument passed to builtins.fetchClosure");
+ state.forceAttrs(*args[0], pos);
std::optional<std::string> fromStoreUrl;
std::optional<StorePath> fromPath;
@@ -19,8 +19,7 @@ static void prim_fetchClosure(EvalState & state, const PosIdx pos, Value * * arg
if (attrName == "fromPath") {
PathSet context;
- fromPath = state.coerceToStorePath(attr.pos, *attr.value, context,
- "while evaluating the 'fromPath' attribute passed to builtins.fetchClosure");
+ fromPath = state.coerceToStorePath(attr.pos, *attr.value, context);
}
else if (attrName == "toPath") {
@@ -28,14 +27,12 @@ static void prim_fetchClosure(EvalState & state, const PosIdx pos, Value * * arg
toCA = true;
if (attr.value->type() != nString || attr.value->string.s != std::string("")) {
PathSet context;
- toPath = state.coerceToStorePath(attr.pos, *attr.value, context,
- "while evaluating the 'toPath' attribute passed to builtins.fetchClosure");
+ toPath = state.coerceToStorePath(attr.pos, *attr.value, context);
}
}
else if (attrName == "fromStore")
- fromStoreUrl = state.forceStringNoCtx(*attr.value, attr.pos,
- "while evaluating the 'fromStore' attribute passed to builtins.fetchClosure");
+ fromStoreUrl = state.forceStringNoCtx(*attr.value, attr.pos);
else
throw Error({