          (cons 'error e))))))
 
 
-(defun doom-packages-update (&optional auto-accept-p)
+(defun doom-packages-update (&optional auto-accept-p timeout)
   "Updates packages.
 
 Unless AUTO-ACCEPT-P is non-nil, this function will prompt for confirmation with
 a list of packages that will be updated."
   (print! (start "Scanning for outdated packages (this may take a while)..."))
   (print-group!
+   (when timeout
+     (print! (info "Using %S as timeout value" timeout)))
    ;; REVIEW Does this fail gracefully enough? Is it error tolerant?
    ;; TODO Add version-lock checks; don't want to spend all this effort on
    ;;      packages that shouldn't be updated

;;
;;; Dispatchers

(defcli! (update u) ()
  "Updates packages.

This excludes packages whose `package!' declaration contains a non-nil :freeze
or :ignore property."
  (doom--ensure-autoloads-while
   (straight-check-all)
   (doom-packages-update doom-auto-accept)))

(defcli! (rebuild build b) (&rest args)
  "Rebuilds all installed packages.

                                         group future)))
               (error! "Failed to create any threads")))
          (total (length futures))
          (timeout (or timeout 45)))
     (condition-case-unless-debug e
         (let (specs)
           (while futures
