      (doom-reload-core-autoloads)
      (when (progn ,@body)
        (doom-reload-package-autoloads 'force-p))
-     (doom--finalize-straight)
      t))
 
 

                    (condition-case e
                        (let* ((default-directory (straight--repos-dir local-repo))
                               (n (string-to-number
                                   (shell-command-to-string "git rev-list --right-only --count HEAD..@'{u}'")))
                               (pretime
                                (string-to-number
                                 (shell-command-to-string "git log -1 --format=%at HEAD")))
                               (time
                                (string-to-number
                                 (shell-command-to-string "git log -1 --format=%at FETCH_HEAD"))))
                          (with-current-buffer (straight--process-get-buffer)
                            (with-silent-modifications

                   (ignore (print! (info "Aborted update")))
                 (terpri)
                 (straight--make-package-modifications-available)
                 (let ((straight--packages-to-rebuild (make-hash-table :test #'equal))
                       (straight--packages-not-to-rebuild (make-hash-table :test #'equal)))
                   (dolist (spec specs)
                     (cl-destructuring-bind (n pretime time recipe) spec
                       (straight--with-plist recipe (local-repo package)
                         (let ((default-directory (straight--repos-dir local-repo)))
                           (print! (start "Updating %S") package)
                           ;; HACK `straight' assumes it won't be used in a
                           ;; noninteractive session, but here we are. If the repo
                           ;; is dirty, the command will lock up, waiting for
                           ;; interaction that will never come, so discard all
                           ;; local changes. Doom doesn't want you modifying those
                           ;; anyway.
                           (and (straight--get-call "git" "reset" "--hard")
                                (straight--get-call "git" "clean" "-ffd"))
                           (straight-merge-package package)
                           ;; HACK `straight-rebuild-package' doesn't pick up that
                           ;; this package has changed, so we do it manually. Is
                           ;; there a better way?
                           (ignore-errors
                             (delete-directory (straight--build-dir package) 'recursive))
                           (puthash package t straight--packages-to-rebuild)
                           (cl-incf n))
                         (with-current-buffer (straight--process-get-buffer)
                           (with-silent-modifications
                             (print! (debug (autofill "%s") (indent 2 (buffer-string))))
                             (erase-buffer))))))
                   (doom--finalize-straight)
                   (doom-packages-rebuild auto-accept-p))
                 t)
             (print! (success "No packages to update"))
             nil))
       (error
