From 89b20d71ce52706856b555cd111b640a19eae78f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 5 May 2019 14:21:44 -0400 Subject: [PATCH] doom-doctor: prevent errors we don't care about --- bin/doom-doctor | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/bin/doom-doctor b/bin/doom-doctor index 5c235c178..44838d2a1 100755 --- a/bin/doom-doctor +++ b/bin/doom-doctor @@ -39,7 +39,9 @@ ;;; Helpers (defun sh (cmd) - (string-trim-right (shell-command-to-string cmd))) + (ignore-errors + (string-trim-right + (shell-command-to-string cmd)))) (defun elc-check-dir (dir) (dolist (file (directory-files-recursively dir "\\.elc$")) @@ -99,12 +101,13 @@ (msg! "Doom v%s (%s)" (or (let ((core-file (expand-file-name "core/core.el" user-emacs-directory))) (and (file-exists-p core-file) - (with-temp-buffer - (insert-file-contents-literally core-file) - (goto-char (point-min)) - (when (re-search-forward "doom-version" nil t) - (forward-char) - (sexp-at-point))))) + (ignore-errors + (with-temp-buffer + (insert-file-contents-literally core-file) + (goto-char (point-min)) + (when (re-search-forward "doom-version" nil t) + (forward-char) + (sexp-at-point)))))) "???") (if (and (executable-find "git") (file-directory-p (expand-file-name ".git" user-emacs-directory)))