From 3d2ad2b70ba26114bfd5ba55d8b580d4f3b158af Mon Sep 17 00:00:00 2001 From: Kevin Amado Date: Fri, 21 Jan 2022 10:43:49 -0500 Subject: forceList: make pos mandatory --- src/nix/prefetch.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nix/prefetch.cc') diff --git a/src/nix/prefetch.cc b/src/nix/prefetch.cc index 7044ead10..de657d6f5 100644 --- a/src/nix/prefetch.cc +++ b/src/nix/prefetch.cc @@ -33,7 +33,7 @@ string resolveMirrorUrl(EvalState & state, string url) auto mirrorList = vMirrors.attrs->find(state.symbols.create(mirrorName)); if (mirrorList == vMirrors.attrs->end()) throw Error("unknown mirror name '%s'", mirrorName); - state.forceList(*mirrorList->value); + state.forceList(*mirrorList->value, noPos); if (mirrorList->value->listSize() < 1) throw Error("mirror URL '%s' did not expand to anything", url); @@ -200,7 +200,7 @@ static int main_nix_prefetch_url(int argc, char * * argv) /* Extract the URL. */ auto & attr = v.attrs->need(state->symbols.create("urls")); - state->forceList(*attr.value); + state->forceList(*attr.value, noPos); if (attr.value->listSize() < 1) throw Error("'urls' list is empty"); url = state->forceString(*attr.value->listElems()[0]); -- cgit v1.2.3