Emit fetch output when updating recipe repos

This commit is contained in:
Henrik Lissner 2020-05-16 17:31:29 -04:00
parent 375faedb1b
commit 6241ba2faa
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395

View File

@ -108,16 +108,18 @@ list remains lean."
(recipe package type local-repo)
(let ((esc (unless doom-debug-mode "\033[1A"))
(ref (straight-vc-get-commit type local-repo))
newref)
newref output)
(print! (start "\033[KUpdating recipes for %s...%s") package esc)
(when (straight-vc-fetch-from-remote recipe)
(setq output (straight--process-get-output))
(straight-merge-package package)
(or (equal ref (setq newref (straight-vc-get-commit type local-repo)))
(print! (success "\033[K%s updated (%s -> %s)")
package
(doom--abbrev-commit ref)
(doom--abbrev-commit newref)))))))
(unless (equal ref (setq newref (straight-vc-get-commit type local-repo)))
(print! (success "\033[K%s updated (%s -> %s)")
package
(doom--abbrev-commit ref)
(doom--abbrev-commit newref))
(unless (string-empty-p output)
(print-group! (print! (info "%s" output)))))))))
(setq straight--recipe-lookup-cache (make-hash-table :test #'eq)
doom--cli-updated-recipes t)))