fix(cli): doom sync: rebuild-all loop

Addresses an edge case where 'doom sync' could fall into an inescapable
'rebuild all packages' loop.

Fix: #7775
This commit is contained in:
Henrik Lissner 2024-03-29 13:25:32 -04:00 committed by Yann Esposito (Yogsototh)
parent 1f6dd7e480
commit 6607f8840f
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646

View file

@ -91,7 +91,7 @@ OPTIONS:
(when (doom-profile-generate)
(print! (item "Restart Emacs or use 'M-x doom/reload' for changes to take effect"))
(run-hooks 'doom-after-sync-hook))
(when (and (not rebuild?) (not nobuild?))
(when (or rebuild? (not (file-exists-p doom-cli-sync-info-file)))
(with-temp-file doom-cli-sync-info-file
(prin1 (cons emacs-version (system-name)) (current-buffer))))
t)