From b65da762b82efa729c69c6dbd457e8b55f4162e0 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 19 Sep 2022 00:01:03 +0200 Subject: [PATCH] fix(cli): 'Profiles not initialized' error Due to $DOOMPROFILE being set to an empty string when persisting Doom CLI sessions, which would affect any case where a CLI command restarts the session (e.g. when the :config literate module tangles a config or 'doom --debug ...' restarts to set DEBUG=1). --- lisp/doom-cli.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/doom-cli.el b/lisp/doom-cli.el index b3fc3c9ff..c7b322ac0 100644 --- a/lisp/doom-cli.el +++ b/lisp/doom-cli.el @@ -1206,7 +1206,7 @@ Emacs' batch library lacks an implementation of the exec system call." "_doomrun() {\n " ,command "\n}\n" ,(string-join persisted-env " \\\n") ,(cl-loop for (envvar . val) - in `(("DOOMPROFILE" . ,(doom-profile->id (or doom-profile doom-profile-default))) + in `(("DOOMPROFILE" . ,(ignore-errors (doom-profile->id doom-profile))) ("EMACSDIR" . ,doom-emacs-dir) ("DOOMDIR" . ,doom-user-dir) ("DEBUG" . ,(if init-file-debug "1"))