          (print! (start "Regrafting %d repos..." (length repos-to-regraft)))
          (and (doom--cli-packages-regraft-repos repos-to-regraft)
               (setq success t)))
-       (when success
-         (doom--finalize-straight)
-         t)))))
+       success))))

       (let ((count (hash-table-count straight--packages-to-rebuild))
             (packages (hash-table-keys straight--packages-to-rebuild)))
         (sort packages #'string-lessp)
         (doom--finalize-straight)
         (print! (success "Updated %d package(s): %s")
                 count (string-join packages ", "))
         (doom-cli-packages-build))

                     (straight--byte-compile-package recipe)))))))))
     (if (= n 0)
         (ignore (print! (success "No packages need rebuilding")))
       (print! (success "Rebuilt %d package(s)" n))
       t))))

