diff options
author | Vladimír Čunát <v@cunat.cz> | 2021-04-01 22:29:39 +0200 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2021-04-01 22:50:22 +0200 |
commit | e5ec487840c458146440511e8d23f13de9bcadca (patch) | |
tree | 2ac00bfefcaf1212c6857bc23e367d8f6962445b /pkgs/build-support/fetchurl | |
parent | d601532dfcd70844b347bf4eaf641ff2ff86c7bd (diff) | |
download | nixpkgs-e5ec487840c458146440511e8d23f13de9bcadca.tar nixpkgs-e5ec487840c458146440511e8d23f13de9bcadca.tar.gz nixpkgs-e5ec487840c458146440511e8d23f13de9bcadca.tar.bz2 nixpkgs-e5ec487840c458146440511e8d23f13de9bcadca.tar.lz nixpkgs-e5ec487840c458146440511e8d23f13de9bcadca.tar.xz nixpkgs-e5ec487840c458146440511e8d23f13de9bcadca.tar.zst nixpkgs-e5ec487840c458146440511e8d23f13de9bcadca.zip |
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.
Diffstat (limited to 'pkgs/build-support/fetchurl')
-rw-r--r-- | pkgs/build-support/fetchurl/default.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchurl/default.nix b/pkgs/build-support/fetchurl/default.nix index c65738aef41..8ce69a7f187 100644 --- a/pkgs/build-support/fetchurl/default.nix +++ b/pkgs/build-support/fetchurl/default.nix @@ -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_ = |