aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops/fetchTree.cc
diff options
context:
space:
mode:
authorGuillaume Maudoux <guillaume.maudoux@tweag.io>2022-03-07 11:33:03 +0100
committerGuillaume Maudoux <guillaume.maudoux@tweag.io>2022-03-07 11:33:03 +0100
commit13c4dc65327c9654c47e6d80c0f4e1797b999f97 (patch)
tree7ec88137a4bdc971522920a27c046082e32c1d2d /src/libexpr/primops/fetchTree.cc
parent1b5a8db148dd4403c64bc058ce1a4a5e46d52031 (diff)
more fixes
Diffstat (limited to 'src/libexpr/primops/fetchTree.cc')
-rw-r--r--src/libexpr/primops/fetchTree.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libexpr/primops/fetchTree.cc b/src/libexpr/primops/fetchTree.cc
index 2baa272cb..31a8907f1 100644
--- a/src/libexpr/primops/fetchTree.cc
+++ b/src/libexpr/primops/fetchTree.cc
@@ -102,7 +102,7 @@ static void fetchTree(
state.forceValue(*args[0], pos);
if (args[0]->type() == nAttrs) {
- state.forceAttrs(*args[0], pos, "While evaluating the argument passed to builtins.fetchTree");
+ state.forceAttrs(*args[0], pos, "While evaluating the argument passed to builtins.fetchTree: ");
fetchers::Attrs attrs;
@@ -112,7 +112,7 @@ static void fetchTree(
.msg = hintfmt("unexpected attribute 'type'"),
.errPos = pos
});
- type = state.forceStringNoCtx(*aType->value, *aType->pos, "While evaluating the `type` attribute passed to builtins.fetchTree");
+ type = state.forceStringNoCtx(*aType->value, *aType->pos, "While evaluating the `type` attribute passed to builtins.fetchTree: ");
} else if (!type)
throw Error({
.msg = hintfmt("attribute 'type' is missing in call to 'fetchTree'"),
@@ -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, "While evaluating the first argument passed to the fetcher").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;
@@ -198,11 +198,11 @@ static void fetch(EvalState & state, const Pos & pos, Value * * args, Value & v,
for (auto & attr : *args[0]->attrs) {
std::string n(attr.name);
if (n == "url")
- url = state.forceStringNoCtx(*attr.value, *attr.pos, "While evaluating the url we should fetch");
+ url = state.forceStringNoCtx(*attr.value, *attr.pos, "While evaluating the url we should fetch: ");
else if (n == "sha256")
- expectedHash = newHashAllowEmpty(state.forceStringNoCtx(*attr.value, *attr.pos, "While evaluating the sha256 of the content we should fetch"), htSHA256);
+ expectedHash = newHashAllowEmpty(state.forceStringNoCtx(*attr.value, *attr.pos, "While evaluating the sha256 of the content we should fetch: "), htSHA256);
else if (n == "name")
- name = state.forceStringNoCtx(*attr.value, *attr.pos, "While evaluating the name of the content we should fetch");
+ name = state.forceStringNoCtx(*attr.value, *attr.pos, "While evaluating the name of the content we should fetch: ");
else
throw EvalError({
.msg = hintfmt("unsupported argument '%s' to '%s'", attr.name, who),
@@ -216,7 +216,7 @@ static void fetch(EvalState & state, const Pos & pos, Value * * args, Value & v,
.errPos = pos
});
} else
- url = state.forceStringNoCtx(*args[0], pos, "While evaluating the url we should fetch");
+ url = state.forceStringNoCtx(*args[0], pos, "While evaluating the url we should fetch: ");
url = resolveUri(*url);