From 12b21743bd8ee14db43ca38e44e7b31e8ea0d2b6 Mon Sep 17 00:00:00 2001 From: derped Date: Fri, 29 Nov 2024 10:57:51 +0100 Subject: [PATCH] lazyUtils: add assertions to keybind function. --- pkgs/lazyUtils.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/lazyUtils.nix b/pkgs/lazyUtils.nix index 3d074ef..53bb823 100644 --- a/pkgs/lazyUtils.nix +++ b/pkgs/lazyUtils.nix @@ -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)