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
This commit is contained in:
Henrik Lissner 2024-06-28 15:46:53 -04:00
parent 42923be0b3
commit 83aa40797e
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -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