diff --git a/bin/doom-doctor b/bin/doom-doctor index 20ce2a469..2172dd3dd 100755 --- a/bin/doom-doctor +++ b/bin/doom-doctor @@ -75,6 +75,7 @@ (defmacro error! (&rest args) `(message (color 1 (color 31 ,@args)))) (defmacro warn! (&rest args) `(message (color 1 (color 33 ,@args)))) (defmacro success! (&rest args) `(message (color 1 (color 32 ,@args)))) +(defmacro log! (&rest args) `(if doom-debug-mode (message (color 34 ,@args)))) (defmacro explain! (&rest args) `(message (indented 2 (autofill ,@args)))) ;;; Polyfills @@ -119,6 +120,7 @@ ;; --- is emacs set up properly? ------------------------------ +(log! "test-emacs") (check! (version< emacs-version "25.1") (error! "Important: Emacs %s detected [%s]" emacs-version (executable-find "emacs")) (explain! @@ -130,6 +132,12 @@ ;; --- is the environment set up properly? -------------------- +;; windows? windows +(log! "test-windows") +(check! (memq system-type '(windows-nt ms-dos cygwin)) + (warn! "Warning: Windows detected") + (explain! "DOOM was designed for MacOS and Linux. Expect a bumpy ride!")) + ;; are all default fonts present (log! "test-fonts") (if (not (fboundp 'find-font)) @@ -165,6 +173,7 @@ "case, ignore this warning.")))))) ;; gnutls-cli & openssl +(log! "test-gnutls") (cond ((executable-find "gnutls-cli")) ((executable-find "openssl") (let* ((output (shell-command-to-string "openssl ciphers -v")) @@ -200,12 +209,13 @@ "network, provider, government, neckbearded mother-in-laws, geeky roommates, " "or just about anyone who knows more about computers than you do!")))) +(log! "test-tls") (cond ((or (executable-find "gnutls-cli") (executable-find "openssl")) (let ((tls-checktrust t) (gnutls-verify-error t)) - (dolist (url '("https://elpa.gnu.org/packages/archive-contents" - "https://melpa.org/packages/archive-contents")) + (dolist (url '("https://elpa.gnu.org" + "https://melpa.org")) (condition-case-unless-debug ex (let (result) (let ((inhibit-message t)) @@ -240,12 +250,8 @@ (t (error! "Nope!"))) -;; windows? windows -(check! (memq system-type '(windows-nt ms-dos cygwin)) - (warn! "Warning: Windows detected") - (explain! "DOOM was designed for MacOS and Linux. Expect a bumpy ride!")) - ;; bsd vs gnu tar +(log! "test-tar") (let ((tar-bin (or (executable-find "gtar") (executable-find "tar")))) (if tar-bin