From 382058e1e66014a9bb3d36579b2c116e26ed2107 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 20 Mar 2023 20:10:12 -0400 Subject: [PATCH] fix(debug): doom-info: improve git error In case Doom has been deployed without git (for some reason), or with an unconventional structure. --- lisp/lib/debug.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/lib/debug.el b/lisp/lib/debug.el index 43d0bdfbe..2ee08c149 100644 --- a/lisp/lib/debug.el +++ b/lisp/lib/debug.el @@ -267,7 +267,9 @@ ready to be pasted in a bug report on github." (car doom-profile) (cdr doom-profile)) "PROFILE=_@0") - (sh "git" "log" "-1" "--format=%D %h %ci") + (if (file-exists-p! ".git" doom-emacs-dir) + (sh "git" "log" "-1" "--format=%D %h %ci") + "[no repo]") (symlink-path doom-user-dir))) (shell . ,(abbrev-path shell-file-name)) (features . ,system-configuration-features)