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:
parent
f748a5d15d
commit
7fec2cf5bb
1 changed files with 7 additions and 3 deletions
|
@ -123,9 +123,13 @@ is non-nil, refresh the cache."
|
|||
doom-profile-dirs))
|
||||
|
||||
(defun doom-profiles-outdated-p ()
|
||||
"Return non-nil if files in `doom-profiles-bootstrap-file' are outdated."
|
||||
(cl-find-if (doom-rpartial #'file-newer-than-file-p doom-profiles-bootstrap-file)
|
||||
doom-profile-config-files))
|
||||
"Return non-nil if files in `doom-profile-loader-file' are outdated."
|
||||
(cl-loop for file in 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)
|
||||
"Return a (NAME . VERSION) profile cons cell from an id string NAME@VERSION."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue