doom-doctor: prevent errors we don't care about
This commit is contained in:
parent
78cff4ef97
commit
89b20d71ce
1 changed files with 10 additions and 7 deletions
|
@ -39,7 +39,9 @@
|
||||||
;;; Helpers
|
;;; Helpers
|
||||||
|
|
||||||
(defun sh (cmd)
|
(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)
|
(defun elc-check-dir (dir)
|
||||||
(dolist (file (directory-files-recursively dir "\\.elc$"))
|
(dolist (file (directory-files-recursively dir "\\.elc$"))
|
||||||
|
@ -99,12 +101,13 @@
|
||||||
(msg! "Doom v%s (%s)"
|
(msg! "Doom v%s (%s)"
|
||||||
(or (let ((core-file (expand-file-name "core/core.el" user-emacs-directory)))
|
(or (let ((core-file (expand-file-name "core/core.el" user-emacs-directory)))
|
||||||
(and (file-exists-p core-file)
|
(and (file-exists-p core-file)
|
||||||
(with-temp-buffer
|
(ignore-errors
|
||||||
(insert-file-contents-literally core-file)
|
(with-temp-buffer
|
||||||
(goto-char (point-min))
|
(insert-file-contents-literally core-file)
|
||||||
(when (re-search-forward "doom-version" nil t)
|
(goto-char (point-min))
|
||||||
(forward-char)
|
(when (re-search-forward "doom-version" nil t)
|
||||||
(sexp-at-point)))))
|
(forward-char)
|
||||||
|
(sexp-at-point))))))
|
||||||
"???")
|
"???")
|
||||||
(if (and (executable-find "git")
|
(if (and (executable-find "git")
|
||||||
(file-directory-p (expand-file-name ".git" user-emacs-directory)))
|
(file-directory-p (expand-file-name ".git" user-emacs-directory)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue