From cd8fb0059dae7b21362a1118f4c813a5220042ef Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 5 Jul 2022 12:41:43 +0200 Subject: [PATCH] fix(cli): validation for regexp arguments string-match-p throws an error if given an invalid regexp, which is what we *should* be testing for, not its return value (which should be ignored), but this wasn't the case before this commit. Fix: #6534 --- core/core-cli-lib.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core-cli-lib.el b/core/core-cli-lib.el index c2fcd8da3..b4685fd63 100644 --- a/core/core-cli-lib.el +++ b/core/core-cli-lib.el @@ -59,7 +59,7 @@ See argument types in `doom-cli-argument-types', and `defcli!' for usage.") :zshcomp "_files") (path :read expand-file-name :zshcomp "_files") (form :read read) - (regexp :test ,(doom-rpartial #'string-match-p "")) + (regexp :test ,(lambda (str) (always (string-match-p str "")))) (int :test "^[0-9]+$" :read string-to-number :error "Not an integer")