mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
tweak(profiles): regen profiles if generator version changed
The profile bootstrap file's first form is the doom-version it was generated with. If this has changed, it should be considered outdated, even if the user's profiles haven't changed.
This commit is contained in:
@ -123,9 +123,13 @@ is non-nil, refresh the cache."
|
|||||||
doom-profile-dirs))
|
doom-profile-dirs))
|
||||||
|
|
||||||
(defun doom-profiles-outdated-p ()
|
(defun doom-profiles-outdated-p ()
|
||||||
"Return non-nil if files in `doom-profiles-bootstrap-file' are outdated."
|
"Return non-nil if files in `doom-profile-loader-file' are outdated."
|
||||||
(cl-find-if (doom-rpartial #'file-newer-than-file-p doom-profiles-bootstrap-file)
|
(cl-loop for file in doom-profile-config-files
|
||||||
doom-profile-config-files))
|
if (or (not (file-exists-p doom-profiles-bootstrap-file))
|
||||||
|
(file-newer-than-file-p file doom-profiles-bootstrap-file)
|
||||||
|
(not (equal (doom-file-read doom-profiles-bootstrap-file :by 'read)
|
||||||
|
doom-version)))
|
||||||
|
return t))
|
||||||
|
|
||||||
(defun doom-profile<-id (id)
|
(defun doom-profile<-id (id)
|
||||||
"Return a (NAME . VERSION) profile cons cell from an id string NAME@VERSION."
|
"Return a (NAME . VERSION) profile cons cell from an id string NAME@VERSION."
|
||||||
|
Reference in New Issue
Block a user