diff options
author | regnat <rg@regnat.ovh> | 2021-06-02 10:36:33 +0200 |
---|---|---|
committer | regnat <rg@regnat.ovh> | 2021-06-02 11:13:12 +0200 |
commit | d12b12a15ba5cda49baacd22fbf7f9f526ed74e4 (patch) | |
tree | 02aa7150e9c0643a8d505678fa42a1f3562d3e4d /tests | |
parent | 5985b8b5275605ddd5e92e2f0a7a9f494ac6e35d (diff) |
Let `nix flake check` keep going when keep-going is set
When the `keep-going` option is set to `true`, make `nix flake check`
continue as much as it can before failing.
The UI isn’t perfect as-it-is as all the lines currently start with a
mostly useless `error (ignored): error:` prefix, but I’m not sure what
the best output would be, so I’ll leave it as-it-is for the time being
(This is a bit hijacking the `keep-going` flag as it’s supposed to be a
build-time only thing. But I think it’s faire to reuse it here).
Fix https://github.com/NixOS/nix/issues/4450
Diffstat (limited to 'tests')
-rw-r--r-- | tests/flakes.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/flakes.sh b/tests/flakes.sh index e78e4a39d..9764e1a6c 100644 --- a/tests/flakes.sh +++ b/tests/flakes.sh @@ -535,6 +535,21 @@ EOF (! nix flake check $flake3Dir) +cat > $flake3Dir/flake.nix <<EOF +{ + outputs = { flake1, self }: { + defaultPackage = { + system-1 = "foo"; + system-2 = "bar"; + }; + }; +} +EOF + +checkRes=$(nix flake check --keep-going $flake3Dir 2>&1 && fail "nix flake check should have failed" || true) +echo "$checkRes" | grep -q "defaultPackage.system-1" +echo "$checkRes" | grep -q "defaultPackage.system-2" + # Test 'follows' inputs. cat > $flake3Dir/flake.nix <<EOF { |