diff --git a/core/autoload/packages.el b/core/autoload/packages.el index 1afd7a85d..922f6e0c0 100644 --- a/core/autoload/packages.el +++ b/core/autoload/packages.el @@ -13,19 +13,6 @@ nil t) table)))) -(defmacro doom--condition-case! (&rest body) - `(condition-case-unless-debug e - (progn ,@body) - ('user-error - (print! (bold (red " NOTICE: %s")) e)) - ('file-error - (print! (bold (red " FILE ERROR: %s")) (error-message-string e)) - (print! " Trying again...") - (quiet! (doom-refresh-packages-maybe t)) - ,@body) - ('error - (print! (bold (red " FATAL ERROR: %s\n Run again with the -d flag for details")) e)))) - (defun doom--refresh-pkg-cache () "Clear the cache for `doom-refresh-packages-maybe'." (setq doom--refreshed-p nil) diff --git a/core/cli/packages.el b/core/cli/packages.el index be9592de4..2c1e630da 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -14,6 +14,19 @@ ;; ;; Helpers +(defmacro doom--condition-case! (&rest body) + `(condition-case-unless-debug e + (progn ,@body) + ('user-error + (print! (bold (red " NOTICE: %s")) e)) + ('file-error + (print! (bold (red " FILE ERROR: %s")) (error-message-string e)) + (print! " Trying again...") + (quiet! (doom-refresh-packages-maybe t)) + ,@body) + ('error + (print! (bold (red " FATAL ERROR: %s\n Run again with the -d flag for details")) e)))) + (defsubst doom--do (fn) (doom-reload-doom-autoloads) (when (funcall fn doom-auto-accept)