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)
|
(when (and (equal (doom-cli-context-step context) 0)
|
||||||
(or ;; profile
|
(or ;; profile
|
||||||
debug?
|
debug?
|
||||||
force?
|
|
||||||
emacsdir
|
emacsdir
|
||||||
doomdir
|
doomdir
|
||||||
pager))
|
pager))
|
||||||
|
@ -213,9 +212,6 @@ SEE ALSO:
|
||||||
(when debug?
|
(when debug?
|
||||||
(setenv "DEBUG" "1")
|
(setenv "DEBUG" "1")
|
||||||
(print! (item "Debug mode enabled")))
|
(print! (item "Debug mode enabled")))
|
||||||
(when force?
|
|
||||||
(setenv "__DOOMFORCE" (and force? "1"))
|
|
||||||
(print! (item "Suppressing all prompts")))
|
|
||||||
(when emacsdir
|
(when emacsdir
|
||||||
(setenv "EMACSDIR" emacsdir))
|
(setenv "EMACSDIR" emacsdir))
|
||||||
(when doomdir
|
(when doomdir
|
||||||
|
@ -223,6 +219,9 @@ SEE ALSO:
|
||||||
(when pager
|
(when pager
|
||||||
(setenv "DOOMPAGER" pager))
|
(setenv "DOOMPAGER" pager))
|
||||||
(exit! :restart))
|
(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.
|
;; Load extra files and forms, as per given options.
|
||||||
(dolist (file loads)
|
(dolist (file loads)
|
||||||
(load (doom-path (cdr file))
|
(load (doom-path (cdr file))
|
||||||
|
|
|
@ -595,7 +595,7 @@ Throws `doom-cli-invalid-option-error' for illegal values."
|
||||||
,@(if (memq ?1 pipes) `((:out . ,scope)))))
|
,@(if (memq ?1 pipes) `((:out . ,scope)))))
|
||||||
:skip t)
|
:skip t)
|
||||||
;; If non-nil, suppress prompts and auto-accept their consequences.
|
;; 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
|
(prefix "@") ; The basename of the script creating this context
|
||||||
meta-p ; Whether or not this is a help/meta request
|
meta-p ; Whether or not this is a help/meta request
|
||||||
error ;
|
error ;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue