From 6a3d0eb6b64920b33683111bce68d1f4a9ef51dd Mon Sep 17 00:00:00 2001 From: Sander Date: Fri, 11 Oct 2024 16:41:04 +0400 Subject: [PATCH] statix: skip adding `--ignore` if empty --- modules/hooks.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/hooks.nix b/modules/hooks.nix index 888184e2..47dbaae3 100644 --- a/modules/hooks.nix +++ b/modules/hooks.nix @@ -3485,7 +3485,7 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.ormol { # instead of repeating the option name for each element, # create a single option with a space-separated list of unique values. - mkList = k: v: [ (mkOptionName k) ] ++ lib.unique v; + mkList = k: v: if v == [ ] then [ ] else [ (mkOptionName k) ] ++ lib.unique v; } settings; in