CURL is not very strict about validation of URLs passed to it. We should reflect this in our handling of URLs that we get from the user in <nix/fetchurl.nix> or builtins.fetchurl. ValidURL was an attempt to rectify this, but it turned out to be too strict. The only good way to resolve this is to pass (in some cases) the user-provided string verbatim to CURL. Other usages in libfetchers still benefit from using structured ParsedURL and validation though. nix store prefetch-file --name foo 'https://cdn.skypack.dev/big.js@^5.2.2' error: 'https://cdn.skypack.dev/big.js@^5.2.2' is not a valid URL: leftover
3.2 KiB
Executable File
3.2 KiB
Executable File