Merge pull request #146 from hlissner/patch-2

No-op if env executable doesn't exist
This commit is contained in:
Vincent Zhang 2019-03-13 10:09:57 +07:00 committed by GitHub
commit e9faab3db5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -154,9 +154,10 @@ PARSER should be a function for parsing COMMAND's output line-by-line, to
(defalias ',update-fn (defalias ',update-fn
(lambda () (lambda ()
(when ,enable-var (when ,enable-var
(when-let* ((command (funcall ,command-var))) (when-let* ((command-list (funcall ,command-var))
(setq doom-modeline-env--command (car command) (exe (executable-find (car command-list))))
doom-modeline-env--command-args (cdr command) (setq doom-modeline-env--command exe
doom-modeline-env--command-args (cdr command-list)
doom-modeline-env--parser ,parser-var) doom-modeline-env--parser ,parser-var)
(doom-modeline-update-env)))) (doom-modeline-update-env))))
(format "Updates the %s version string in the modeline." ',name)) (format "Updates the %s version string in the modeline." ',name))