1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

Add a test for fetchClosure and 'nix store make-content-addressed'

This commit is contained in:
Eelco Dolstra 2022-03-22 23:19:21 +01:00
parent 4120930ac1
commit 28186b7044
5 changed files with 64 additions and 4 deletions

View file

@ -53,7 +53,9 @@ static void prim_fetchClosure(EvalState & state, const Pos & pos, Value * * args
auto parsedURL = parseURL(*fromStoreUrl);
if (parsedURL.scheme != "http" && parsedURL.scheme != "https")
if (parsedURL.scheme != "http" &&
parsedURL.scheme != "https" &&
!(getEnv("_NIX_IN_TEST").has_value() && parsedURL.scheme == "file"))
throw Error({
.msg = hintfmt("'fetchClosure' only supports http:// and https:// stores"),
.errPos = pos