lazyUtils: add assertions to keybind function.

This commit is contained in:
Kevin Baensch 2024-11-29 10:57:51 +01:00
parent ca7310c274
commit 12b21743bd
Signed by: derped
GPG key ID: C0F1D326C7626543

View file

@ -60,6 +60,10 @@ let
cmdIsFunction ? false,
opts ? null,
}:
assert builtins.isString bind;
assert builtins.isNull cmd || builtins.isString cmd;
assert builtins.isBool cmdIsFunction;
assert builtins.isNull opts || builtins.isAttrs opts;
lib.filter (option: !builtins.isNull option) [
bind
(if (cmdIsFunction == true) && (builtins.isString cmd) then (_: cmd) else cmd)