fix(cli): duplicate log files
This commit is contained in:
parent
aef14f078d
commit
c370cb1784
2 changed files with 17 additions and 19 deletions
|
@ -1030,6 +1030,7 @@ See `doom-cli-log-file-format' for details."
|
||||||
|
|
||||||
(defun doom-cli--output-write-logs-h (context)
|
(defun doom-cli--output-write-logs-h (context)
|
||||||
"Write all log buffers to their appropriate files."
|
"Write all log buffers to their appropriate files."
|
||||||
|
(when (/= doom-cli--exit-code 254)
|
||||||
;; Delete the last `doom-cli-log-retain' logs
|
;; Delete the last `doom-cli-log-retain' logs
|
||||||
(mapc #'delete-file
|
(mapc #'delete-file
|
||||||
(let ((prefix (doom-cli-context-prefix context)))
|
(let ((prefix (doom-cli-context-prefix context)))
|
||||||
|
@ -1045,7 +1046,7 @@ See `doom-cli-log-file-format' for details."
|
||||||
(with-temp-file file
|
(with-temp-file file
|
||||||
(insert-buffer-substring buffer)
|
(insert-buffer-substring buffer)
|
||||||
(ansi-color-filter-region (point-min) (point-max)))
|
(ansi-color-filter-region (point-min) (point-max)))
|
||||||
(set-file-modes file #o600))))
|
(set-file-modes file #o600)))))
|
||||||
|
|
||||||
(defun doom-cli--output-benchmark-h (context)
|
(defun doom-cli--output-benchmark-h (context)
|
||||||
"Write this session's benchmark to stdout or stderr, depending.
|
"Write this session's benchmark to stdout or stderr, depending.
|
||||||
|
|
|
@ -355,9 +355,6 @@ Otherwise, `en/disable-command' (in novice.el.gz) is hardcoded to write them to
|
||||||
|
|
||||||
;; ...then load *the* one
|
;; ...then load *the* one
|
||||||
(require 'doom-lib)
|
(require 'doom-lib)
|
||||||
;; ...and in batch session, load our CLI framework
|
|
||||||
(when noninteractive
|
|
||||||
(require 'doom-cli-lib))
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue