diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-03-22 23:19:21 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-03-24 21:33:33 +0100 |
commit | 28186b7044dca513e6e07c3e66b7de2143543ae4 (patch) | |
tree | ca0c85881f52ac76ea0b29fd9f80349e39ba255a /src/libexpr | |
parent | 4120930ac19ab7296818fdc1d1389e7799168867 (diff) |
Add a test for fetchClosure and 'nix store make-content-addressed'
Diffstat (limited to 'src/libexpr')
-rw-r--r-- | src/libexpr/primops/fetchClosure.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libexpr/primops/fetchClosure.cc b/src/libexpr/primops/fetchClosure.cc index 247bceb07..47e2d2bf2 100644 --- a/src/libexpr/primops/fetchClosure.cc +++ b/src/libexpr/primops/fetchClosure.cc @@ -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 |