From a8cced9d29696ed97496cf8ee8e751e9aa6c94a4 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Wed, 26 May 2021 00:42:13 -0400 Subject: [PATCH] Fix prettier-js-mode-maybe to check for 0 exit code instead of checking for empty string --- .emacs.d/init.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index d91b158..778744a 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -984,10 +984,7 @@ :init (defun prettier-js-mode-maybe () (interactive) - (when (not (string= - "" - (shell-command-to-string - (concat "prettier --find-config-path " (buffer-file-name))))) + (when (not (call-process "prettier" nil nil nil "--find-config-path" (buffer-file-name))) (prettier-js-mode t)))) (use-package show-marks