Reduce noise from doom doctor

And fix not-enough-arguments error from format.
This commit is contained in:
Henrik Lissner 2018-05-20 15:18:36 +02:00
parent f3f8172579
commit ddadb79952
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -112,11 +112,8 @@
(message "Compiled with:\n%s" (indented 2 system-configuration-features))) (message "Compiled with:\n%s" (indented 2 system-configuration-features)))
(message "uname -a:\n%s\n" (indented 2 (sh "uname -a"))) (message "uname -a:\n%s\n" (indented 2 (sh "uname -a")))
(msg! "----\n")
;; --- is emacs set up properly? ------------------------------ ;; --- is emacs set up properly? ------------------------------
(section! "test-emacs")
(when (version< emacs-version "25.1") (when (version< emacs-version "25.1")
(error! "Important: Emacs %s detected [%s]" emacs-version (executable-find "emacs")) (error! "Important: Emacs %s detected [%s]" emacs-version (executable-find "emacs"))
(explain! (explain!
@ -125,7 +122,6 @@
(concat "\nMacOS users should use homebrew (https://brew.sh) to install Emacs\n" (concat "\nMacOS users should use homebrew (https://brew.sh) to install Emacs\n"
" brew install emacs --with-modules --with-imagemagick --with-cocoa")))) " brew install emacs --with-modules --with-imagemagick --with-cocoa"))))
(section! "test-private-config")
(let ((xdg-dir (concat (or (getenv "XDG_CONFIG_HOME") (let ((xdg-dir (concat (or (getenv "XDG_CONFIG_HOME")
"~/.config") "~/.config")
"/doom/")) "/doom/"))
@ -140,14 +136,12 @@
;; --- is the environment set up properly? -------------------- ;; --- is the environment set up properly? --------------------
;; windows? windows ;; on windows?
(section! "test-windows")
(when (memq system-type '(windows-nt ms-dos cygwin)) (when (memq system-type '(windows-nt ms-dos cygwin))
(warn! "Warning: Windows detected") (warn! "Warning: Windows detected")
(explain! "DOOM was designed for MacOS and Linux. Expect a bumpy ride!")) (explain! "DOOM was designed for MacOS and Linux. Expect a bumpy ride!"))
;; are all default fonts present ;; are all default fonts present?
(section! "test-fonts")
(if (not (fboundp 'find-font)) (if (not (fboundp 'find-font))
(progn (progn
(warn! "Warning: unable to detect font") (warn! "Warning: unable to detect font")
@ -170,7 +164,6 @@
"case, ignore this warning.")))))) "case, ignore this warning."))))))
;; gnutls-cli & openssl ;; gnutls-cli & openssl
(section! "test-gnutls")
(cond ((executable-find "gnutls-cli")) (cond ((executable-find "gnutls-cli"))
((executable-find "openssl") ((executable-find "openssl")
(let* ((output (sh "openssl ciphers -v")) (let* ((output (sh "openssl ciphers -v"))
@ -205,7 +198,7 @@
"network, provider, government, neckbearded mother-in-laws, geeky roommates, " "network, provider, government, neckbearded mother-in-laws, geeky roommates, "
"or just about anyone who knows more about computers than you do!"))) "or just about anyone who knows more about computers than you do!")))
(section! "test-tls") ;; are certificates validated properly?
(cond ((not (string-match-p "\\_<GNUTLS\\_>" system-configuration-features)) (cond ((not (string-match-p "\\_<GNUTLS\\_>" system-configuration-features))
(warn! "Warning: You didn't install Emacs with gnutls support") (warn! "Warning: You didn't install Emacs with gnutls support")
(explain! (explain!
@ -254,8 +247,7 @@
((error! "Nope!"))) ((error! "Nope!")))
;; bsd vs gnu tar ;; which variant of tar is on your system? bsd or gnu tar?
(section! "test-tar")
(let ((tar-bin (or (executable-find "gtar") (let ((tar-bin (or (executable-find "gtar")
(executable-find "tar")))) (executable-find "tar"))))
(if tar-bin (if tar-bin
@ -291,7 +283,7 @@
(setq doom-modules nil)))) (setq doom-modules nil))))
(when (bound-and-true-p doom-modules) (when (bound-and-true-p doom-modules)
(section! "test-modules") (section! "Running module doctors...")
(let ((indent 4)) (let ((indent 4))
(advice-add #'require :around #'doom*shut-up) (advice-add #'require :around #'doom*shut-up)
(maphash (maphash
@ -316,6 +308,7 @@
;; ;;
(message "\n----") (message "\n----")
(if (> doom-errors 0) (if (> doom-errors 0)
(warn! "There %s!" (if (= doom-errors 1) "is %d issue" "are %d issues") (warn! "There %s!"
doom-errors) (format (if (= doom-errors 1) "is %d issue" "are %d issues")
doom-errors))
(success! "Everything seems fine, happy Emacs'ing!")) (success! "Everything seems fine, happy Emacs'ing!"))