fix(cli): -!/--force being ignored
Forgot to adapt the old code to use doom-cli-context struct! Fix: #6485
This commit is contained in:
parent
72a8485d77
commit
5519c030ff
2 changed files with 4 additions and 5 deletions
7
bin/doom
7
bin/doom
|
@ -203,7 +203,6 @@ SEE ALSO:
|
|||
(when (and (equal (doom-cli-context-step context) 0)
|
||||
(or ;; profile
|
||||
debug?
|
||||
force?
|
||||
emacsdir
|
||||
doomdir
|
||||
pager))
|
||||
|
@ -213,9 +212,6 @@ SEE ALSO:
|
|||
(when debug?
|
||||
(setenv "DEBUG" "1")
|
||||
(print! (item "Debug mode enabled")))
|
||||
(when force?
|
||||
(setenv "__DOOMFORCE" (and force? "1"))
|
||||
(print! (item "Suppressing all prompts")))
|
||||
(when emacsdir
|
||||
(setenv "EMACSDIR" emacsdir))
|
||||
(when doomdir
|
||||
|
@ -223,6 +219,9 @@ SEE ALSO:
|
|||
(when pager
|
||||
(setenv "DOOMPAGER" pager))
|
||||
(exit! :restart))
|
||||
(when force?
|
||||
(setf (doom-cli-context-suppress-prompts-p context) t)
|
||||
(print! (item "Suppressing all prompts")))
|
||||
;; Load extra files and forms, as per given options.
|
||||
(dolist (file loads)
|
||||
(load (doom-path (cdr file))
|
||||
|
|
|
@ -595,7 +595,7 @@ Throws `doom-cli-invalid-option-error' for illegal values."
|
|||
,@(if (memq ?1 pipes) `((:out . ,scope)))))
|
||||
:skip t)
|
||||
;; If non-nil, suppress prompts and auto-accept their consequences.
|
||||
(suppress-prompts-p (if (getenv "__DOOMFORCE") t))
|
||||
suppress-prompts-p
|
||||
(prefix "@") ; The basename of the script creating this context
|
||||
meta-p ; Whether or not this is a help/meta request
|
||||
error ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue