fix(cli): doom-packages-ensure: ensure local packages are built

If the package is local, the local-repo has absolute local file path,
and straight-modified-dir will return as it is, which always exists.

Fix it by passing package only to straight-modified-dir.
This commit is contained in:
Levin Du 2024-04-16 15:00:56 +08:00 committed by Yann Esposito (Yogsototh)
parent 5e9e569649
commit b121be1c90
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646

View file

@ -301,7 +301,7 @@ list remains lean."
(setq want-native-compile nil)) (setq want-native-compile nil))
(and (or want-byte-compile want-native-compile) (and (or want-byte-compile want-native-compile)
(or (file-newer-than-file-p repo-dir build-dir) (or (file-newer-than-file-p repo-dir build-dir)
(file-exists-p (straight--modified-dir (or local-repo package))) (file-exists-p (straight--modified-dir package))
(cl-loop with outdated = nil (cl-loop with outdated = nil
for file in (doom-files-in build-dir :match "\\.el$" :full t) for file in (doom-files-in build-dir :match "\\.el$" :full t)
if (or (if want-byte-compile (doom-packages--elc-file-outdated-p file)) if (or (if want-byte-compile (doom-packages--elc-file-outdated-p file))