Fix guardNonEmptyString

One of the simplest mistakes.
I use more TDD nowadays...
This commit is contained in:
Robert Hensing 2025-11-10 21:28:14 +01:00
parent 44b4626e81
commit ef91937276

View file

@ -295,7 +295,7 @@ rec {
*/ */
# TODO: get something like builtins.pathType or builtins.stat into Nix # TODO: get something like builtins.pathType or builtins.stat into Nix
guardFile = p: if pathExists p then [p] else []; guardFile = p: if pathExists p then [p] else [];
guardNonEmptyString = s: if s == "" then [s] else []; guardNonEmptyString = s: if s == "" then [] else [s];
guardNonNull = a: if a != null then a else []; guardNonNull = a: if a != null then a else [];