Do not check for `mu` executable, it's in WSL

This commit is contained in:
Samvid Mistry 2023-11-01 14:00:26 +05:30
parent 15d4f23e34
commit 84512cbfe3
2 changed files with 21 additions and 19 deletions

View File

@ -395,24 +395,25 @@ As per issue #2198."
,(when mu4e-mu-home (format "--muhome=%s" mu4e-mu-home)))))
(defun mu4e--version-check ()
;; sanity-check 1
(let ((default-directory temporary-file-directory)) ;;ensure it's local.
(unless (and mu4e-mu-binary (file-executable-p mu4e-mu-binary))
(mu4e-error
"Cannot find mu, please set `mu4e-mu-binary' to the mu executable path"))
;; sanity-check 2
(let ((version (let ((s (shell-command-to-string
(concat mu4e-mu-binary " --version"))))
(and (string-match "version \\([.0-9]+\\)" s)
(match-string 1 s)))))
(if (not (string= version mu4e-mu-version))
(mu4e-error
(concat
"Found mu version %s, but mu4e needs version %s"
"; please set `mu4e-mu-binary' "
"accordingly")
version mu4e-mu-version)
(mu4e-message "Found mu version %s" version)))))
;; sanity-check 1
(let ((default-directory temporary-file-directory)) ;;ensure it's local.
(unless (and mu4e-mu-binary ;; (file-executable-p mu4e-mu-binary)
)
(mu4e-error
"Cannot find mu, please set `mu4e-mu-binary' to the mu executable path"))
;; sanity-check 2
(let ((version (let ((s (shell-command-to-string
(concat mu4e-mu-binary " --version"))))
(and (string-match "version \\([.0-9]+\\)" s)
(match-string 1 s)))))
(if (not (string= version mu4e-mu-version))
(mu4e-error
(concat
"Found mu version %s, but mu4e needs version %s"
"; please set `mu4e-mu-binary' "
"accordingly")
version mu4e-mu-version)
(mu4e-message "Found mu version %s" version)))))
(defun mu4e-server-repl ()
"Start a mu4e-server repl.

View File

@ -84,7 +84,8 @@ is non-nil."
(unless (string= (mu4e-server-version) mu4e-mu-version)
(mu4e-error "The mu server has version %s, but we need %s"
(mu4e-server-version) mu4e-mu-version)))
(unless (and mu4e-mu-binary (file-executable-p mu4e-mu-binary))
(unless (and mu4e-mu-binary ;; (file-executable-p mu4e-mu-binary)
)
(mu4e-error "Please set `mu4e-mu-binary' to the full path to the mu
binary"))
(dolist (var '(mu4e-sent-folder mu4e-drafts-folder