1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 21:21:06 +00:00

fetchurl: check that url is a string

Otherwise we (may) get a hard to debug issue in the tarball job,
e.g. see the grandparent commit.
This commit is contained in:
Vladimír Čunát 2021-04-01 22:29:39 +02:00
parent d601532dfc
commit e5ec487840
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA

View file

@ -104,7 +104,9 @@ let
if urls != [] && url == "" then
(if lib.isList urls then urls
else throw "`urls` is not a list")
else if urls == [] && url != "" then [url]
else if urls == [] && url != "" then
(if lib.isString url then [url]
else throw "`url` is not a string")
else throw "fetchurl requires either `url` or `urls` to be set";
hash_ =