Doom installation fails with a `void-variable` Lisp error
- Dominant language
- Emacs Lisp
- Stars
- 22.7k
- Forks
- 3.1k
- Avg merge
- 10h 46m
- Merged PRs (30d)
- 4
Description
### I confirm that...
- [X] I have searched the [issue tracker](https://github.com/doomemacs/doomemacs/issues), [documentation](https://docs.doomemacs.org), [FAQ](https://docs.doomemacs.org/-/faq), [Discourse](https://discourse.doomemacs.org), and [Google](https://google.com), in case this issue has already been reported/resolved.
- [X] I have read "[How to Debug Issues](https://doomemacs.org/d/how2debug)", and will use it to provide as much information about this issue as possible.
- [X] The issue can be reproduced on the **latest** available commit of Doom.
- [X] The issue can be reproduced on a stable release of Emacs, such as 27 or 28. *(Doom does not support development builds like 29+ or any version ending in .50 or .9x)*
### Expected behavior
Doom gets installed properly as it used to.
### Current behavior
`doom install` or really `doom` anything fails with a Lisp error. I get the following output:
```
Debugger entered--Lisp error: (doom-core-error "/home/zilti/.config/emacs/lisp/doom-cli.el" (void-variable ))
signal(doom-core-error ("/home/zilti/.config/emacs/lisp/doom-cli.el" (void-variable )))
(condition-case e (load path noerror 'nomessage) ((debug doom-error) (signal (car e) (cdr e))) ((debug error) (setq path (locate-file path load-path (get-load-suffixes))) (signal (cond ((not (and path (featurep ...))) 'error) ((file-in-directory-p path (expand-file-name "cli" doom-core-dir)) 'doom-cli-error) ((file-in-directory-p path doom-core-dir) 'doom-core-error) ((file-in-directory-p path doom-user-dir) 'doom-user-error) ((file-in-directory-p path doom-profile-dir) 'doom-profile-error) ((file-in-directory-p path doom-modules-dir) 'doom-module-error) ('doom-error)) (list path e))))
doom-load("doom-cli" nil)
(or (featurep feature subfeature) (doom-load (if subfeature (file-name-concat doom-core-dir (string-remove-prefix "doom-" (symbol-name feature)) (symbol-name filename)) (symbol-name feature)) noerror))
(let ((subfeature (if (symbolp filename) filename))) (or (featurep feature subfeature) (doom-load (if subfeature (file-name-concat doom-core-dir (string-remove-prefix "doom-" (symbol-name feature)) (symbol-name filename)) (symbol-name feature)) noerror)))
doom-require(doom-cli)
(if (let ((load-suffixes '(".elc" ".el"))) (condition-case _ (load (expand-file-name "lisp/doom" user-emacs-directory) nil (not init-file-debug) nil 'must-suffix) (file-missing (prog1 (defalias 'startup--load-user-init-file@reroute-to-profile #'(lambda ... ...)) (advice-add 'startup--load-user-init-file :filter-args #'startup--load-user-init-file@reroute-to-profile)) (setq user-init-file (expand-file-name "early-init" user-emacs-directory)) (setq load-prefer-newer t) (setq gc-cons-threshold (* 16 1024 1024)) nil))) (doom-require (if noninteractive 'doom-cli 'doom-start)))
(let (file-name-handler-alist) (let* ((command-line-args (if noninteractive nil command-line-args)) (profile (or (car (cdr (member "--profile" command-line-args))) (getenv-internal "DOOMPROFILE")))) (if (null profile) (let ((init-dir (or (car ...) (getenv-internal "EMACSDIR")))) (if (null init-dir) (if noninteractive (progn (setq user-emacs-directory ...))) (setq command-switch-alist (cons (cons "--init-directory" ...) command-switch-alist)) (setq user-emacs-directory (expand-file-name init-dir)))) (setq command-switch-alist (cons (cons "--profile" #'(lambda ... ...)) command-switch-alist)) (setenv "DOOMPROFILE" profile) (or (load (expand-file-name (format (let ... ...) emacs-major-version) user-emacs-directory) 'noerror (not init-file-debug) 'nosuffix) (user-error "Profiles not initialized yet; run 'doom sync' firs...")))) (if (let ((load-suffixes '(".elc" ".el"))) (condition-case _ (load (expand-file-name "lisp/doom" user-emacs-directory) nil (not init-file-debug) nil 'must-suffix) (file-missing (prog1 (defalias 'startup--load-user-init-file@reroute-to-profile #'...) (advice-add 'startup--load-user-init-file :filter-args #'startup--load-user-init-file@reroute-to-profile)) (setq user-init-file (expand-file-name "early-init" user-emacs-directory)) (setq load-prefer-newer t) (setq gc-cons-threshold (* 16 1024 1024)) nil))) (doom-require (if noninteractive 'doom-cli 'doom-start))))
(or (let (file-name-handler-alist) (let* ((command-line-args (if noninteractive nil command-line-args)) (profile (or (car (cdr ...)) (getenv-internal "DOOMPROFILE")))) (if (null profile) (let ((init-dir (or ... ...))) (if (null init-dir) (if noninteractive (progn ...)) (setq command-switch-alist (cons ... command-switch-alist)) (setq user-emacs-directory (expand-file-name init-dir)))) (setq command-switch-alist (cons (cons "--profile" #'...) command-switch-alist)) (setenv "DOOMPROFILE" profile) (or (load (expand-file-name (format ... emacs-major-version) user-emacs-directory) 'noerror (not init-file-debug) 'nosuffix) (user-error "Profiles not initialized yet; run 'doom sync' firs...")))) (if (let ((load-suffixes '(".elc" ".el"))) (condition-case _ (load (expand-file-name "lisp/doom" user-emacs-directory) nil (not init-file-debug) nil 'must-suffix) (file-missing (prog1 (defalias ... ...) (advice-add ... :filter-args ...)) (setq user-init-file (expand-file-name "early-init" user-emacs-directory)) (setq load-prefer-newer t) (setq gc-cons-threshold (* 16 1024 1024)) nil))) (doom-require (if noninteractive 'doom-cli 'doom-start)))) (load user-init-file 'noerror (not init-file-debug) nil 'must-suffix))
eval-buffer(# nil "/home/zilti/.config/emacs/early-init.el" nil t) ; Reading at buffer position 7908
load-with-code-conversion("/home/zilti/.config/emacs/early-init.el" "/home/zilti/.config/emacs/early-init.el" nil t)
load("/home/zilti/.config/emacs/early-init.el" nil nomessage nosuffix)
(and (load init-file nil 'nomessage 'nosuffix) (featurep 'doom))
(or (and (load init-file nil 'nomessage 'nosuffix) (featurep 'doom)) (user-error "Failed to load Doom from %s" init-file))
(let* ((bin-dir (file-name-directory (file-truename load-file-name))) (init-file (expand-file-name "../early-init.el" bin-dir))) (or (and (load init-file nil 'nomessage 'nosuffix) (featurep 'doom)) (user-error "Failed to load Doom from %s" init-file)))
(condition-case e (let* ((bin-dir (file-name-directory (file-truename load-file-name))) (init-file (expand-file-name "../early-init.el" bin-dir))) (or (and (load init-file nil 'nomessage 'nosuffix) (featurep 'doom)) (user-error "Failed to load Doom from %s" init-file))) (user-error (message "Error: %s" (car (cdr e))) (kill-emacs 2)))
eval-buffer(# nil "/home/zilti/.config/emacs/bin/doom" nil t) ; Reading at buffer position 4981
load-with-code-conversion("/home/zilti/.config/emacs/bin/doom" "/home/zilti/.config/emacs/bin/doom" nil t)
load("/home/zilti/.config/emacs/bin/doom" nil t)
command-line-1(("--load" "/home/zilti/.local/bin/doom" "--" "info"))
command-line()
normal-top-level()
```
### Steps to reproduce
1. `git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.config/emacs`
2. `~/.config/emacs/bin/doom install`
### System Information
Unavailable, `doom info` only returns the above Lisp error
Contributor guide
Assessment
This issue has not been assessed yet.