Skip to content

Commit 19ce459

Browse files
committed
fix(cli): module cli.el loader
$DOOMDIR/init.el had to be loaded earlier, so we could read the active module list. This indirectly fixes an issue where users' literate configs weren't being tangled on 'doom sync'. Fix: #6479
1 parent fe85093 commit 19ce459

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

bin/doom

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@
105105

106106
(require 'core-cli (expand-file-name "core/core-cli" user-emacs-directory))
107107

108+
;; Load $DOOMDIR/init.el, to read the user's `doom!' block, and so users can
109+
;; customize things early, if they like.
110+
(load! doom-module-init-file doom-private-dir t)
111+
108112

109113
;;
110114
;;; Entry point
@@ -218,9 +222,6 @@ SEE ALSO:
218222
(when pager
219223
(setenv "DOOMPAGER" pager))
220224
(exit! :restart))
221-
;; Load $DOOMDIR/init.el, so users can customize things, if they like.
222-
(doom-log "Loading $DOOMDIR/init.el")
223-
(load! doom-module-init-file doom-private-dir t)
224225
;; Load extra files and forms, as per given options.
225226
(dolist (file loads)
226227
(load (doom-path (cdr file))
@@ -288,10 +289,9 @@ SEE ALSO:
288289
(let ((cli-file "cli"))
289290
(defgroup! "Module commands"
290291
(dolist (key (hash-table-keys doom-modules))
291-
(when-let* ((path (plist-get (gethash key doom-modules) path))
292-
(path (car (doom-glob path cli-file))))
292+
(when-let (path (plist-get (gethash key doom-modules) :path))
293293
(defgroup! :prefix (format "+%s" (cdr key))
294-
(defautoload! () path)))))
294+
(load! cli-file path t)))))
295295

296296
(doom-log "Loading $DOOMDIR/cli.el")
297297
(load! cli-file doom-private-dir t))))

0 commit comments

Comments
 (0)