From 83aa40797e068f78064f11886e8d572946787e5e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 28 Jun 2024 15:46:53 -0400 Subject: [PATCH] fix(cli): suppress secondary prompts from straight on -!/--force The -!/--force flags suppress straight's 'how to proceed' prompts, but not the secondary ones like 'Really delete remote "origin"?'. This fixes that. Fix: #7906 --- lisp/cli/packages.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/cli/packages.el b/lisp/cli/packages.el index bc9ef51fa..d6ab5572e 100644 --- a/lisp/cli/packages.el +++ b/lisp/cli/packages.el @@ -723,6 +723,11 @@ original state.") (let (autoload-compute-prefixes) (apply fn args))) +(defadvice! doom-cli--straight-suppress-confirm-a (&rest _) + :before-until #'straight-are-you-sure + (and (bound-and-true-p doom-cli--context) + (doom-cli-context-suppress-prompts-p doom-cli--context))) + (defadvice! doom-cli--straight-fallback-to-tty-prompt-a (fn prompt actions) "Modifies straight to prompt on the terminal when in noninteractive sessions." :around #'straight--popup-raw