diff options
author | Guillaume Maudoux <guillaume.maudoux@tweag.io> | 2022-04-28 12:54:14 +0200 |
---|---|---|
committer | Guillaume Maudoux <guillaume.maudoux@tweag.io> | 2022-04-28 12:54:14 +0200 |
commit | acf990c9ea9de913a500cf2b7a7492eef3bcd7b5 (patch) | |
tree | 3c5c5427195422554c2f9df6d2b580bd0a74132e /src/libexpr/primops/fetchTree.cc | |
parent | 963b8aa39b169bf5c054449ddce39d60faacf298 (diff) |
fix errors case and wording
Diffstat (limited to 'src/libexpr/primops/fetchTree.cc')
-rw-r--r-- | src/libexpr/primops/fetchTree.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libexpr/primops/fetchTree.cc b/src/libexpr/primops/fetchTree.cc index 2baa272cb..25fb8d939 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); |