Fix some packages failing to fetch on 'doom update'

This commit is contained in:
Henrik Lissner 2020-01-27 01:44:30 -05:00
parent f5800b5b40
commit 5056c74688
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -100,7 +100,7 @@ declaration) or dependency thereof that hasn't already been."
(straight-vc-check-out-commit recipe target-ref) (straight-vc-check-out-commit recipe target-ref)
(straight-rebuild-package package t)) (straight-rebuild-package package t))
(ignore-errors (ignore-errors
(delete-directory (straight--repos-dir package) 'recursive)) (delete-directory (straight--repos-dir local-repo) 'recursive))
(straight-use-package (intern package)))))) (straight-use-package (intern package))))))
(error (error
(signal 'doom-package-error (signal 'doom-package-error
@ -191,13 +191,19 @@ declaration) or dependency thereof that hasn't already been."
(doom--same-commit-p target-ref (straight-vc-get-commit type local-repo))) (doom--same-commit-p target-ref (straight-vc-get-commit type local-repo)))
((print! (start "\033[K(%d/%d) Re-cloning %s...%s") i total local-repo esc) ((print! (start "\033[K(%d/%d) Re-cloning %s...%s") i total local-repo esc)
(ignore-errors (delete-directory (straight--repos-dir package) 'recursive)) (let ((repo (straight--repos-dir local-repo)))
(straight-use-package (intern package) nil 'no-build) (ignore-errors
(prog1 (file-directory-p (straight--repos-dir package)) (delete-directory repo 'recursive))
(or (not (eq type 'git)) (print-group!
(setq output (doom--commit-log-between ref target-ref)))))) (straight-use-package (intern package) nil 'no-build))
(prog1 (file-directory-p repo)
(or (not (eq type 'git))
(setq output (doom--commit-log-between ref target-ref)))))))
(progn (progn
(print! (warn "\033[K(%d/%d) Failed to fetch %s") i total local-repo) (print! (warn "\033[K(%d/%d) Failed to fetch %s")
i total local-repo)
(unless (string-empty-p output)
(print-group! (print! (info "%s" output))))
(cl-return))) (cl-return)))
(puthash local-repo t repos-to-rebuild) (puthash local-repo t repos-to-rebuild)
(puthash package t packages-to-rebuild) (puthash package t packages-to-rebuild)