summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2020-12-04 22:46:13 +0200
committerGitHub <noreply@github.com>2020-12-04 22:46:13 +0200
commite9529c246cd0175427eb99c96cbeeebd8305499e (patch)
treeddc13e570f96612db67d1bbf399454299b427561
parent4eed85187f15ffdebf6f19f4b8e156dac68a5b36 (diff)
parent03d5640cee297cf8fbf91d651dd3cfb30720260f (diff)
Merge pull request #1850 from juanjosegarciaripoll/fix-for-mu4e-proc-start
Do not use shell commands to extract version number
-rw-r--r--mu4e/mu4e-proc.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/mu4e/mu4e-proc.el b/mu4e/mu4e-proc.el
index e0bb620..8063f42 100644
--- a/mu4e/mu4e-proc.el
+++ b/mu4e/mu4e-proc.el
@@ -243,9 +243,9 @@ backslashes and double-quotes."
"Cannot find mu, please set `mu4e-mu-binary' to the mu executable path"))
;; sanity-check 2
- (let ((version (shell-command-to-string
- (format "%s --version | head -1 | sed 's/.*version //' | tr -d '\n'"
- mu4e-mu-binary))))
+ (let ((version (let ((s (shell-command-to-string (concat mu4e-mu-binary " --version"))))
+ (and (string-match "version \\([.0-9]+\\)" s)
+ (match-string 1 s)))))
(unless (string= version mu4e-mu-version)
(mu4e-error
(concat