aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers/fetchers.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-04-02 19:04:33 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-04-07 09:09:18 +0200
commitf58a9b0e62879e28cc7cac59b489a52c924bbc36 (patch)
tree315f86d13edcc78e26eb3a2237afd73baadb7ae6 /src/libfetchers/fetchers.cc
parent670feb000a9fac76f0996711f061ec466a53dc97 (diff)
Respect the narHash attribute in more input types
(cherry picked from commit a6ff66b658b61aef80d936f0183447fe4cb46000)
Diffstat (limited to 'src/libfetchers/fetchers.cc')
-rw-r--r--src/libfetchers/fetchers.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libfetchers/fetchers.cc b/src/libfetchers/fetchers.cc
index 25d3da431..94ac30e38 100644
--- a/src/libfetchers/fetchers.cc
+++ b/src/libfetchers/fetchers.cc
@@ -29,8 +29,10 @@ std::unique_ptr<Input> inputFromURL(const std::string & url)
std::unique_ptr<Input> inputFromAttrs(const Attrs & attrs)
{
+ auto attrs2(attrs);
+ attrs2.erase("narHash");
for (auto & inputScheme : *inputSchemes) {
- auto res = inputScheme->inputFromAttrs(attrs);
+ auto res = inputScheme->inputFromAttrs(attrs2);
if (res) {
if (auto narHash = maybeGetStrAttr(attrs, "narHash"))
// FIXME: require SRI hash.