fix(cli): git version check on Windows

Of course Git on Windows produces '2.33.0.windows.2'. Why wouldn't it?
This commit is contained in:
Henrik Lissner 2021-08-25 14:22:47 -04:00
parent ff62412c11
commit 48239aeb97

View file

@ -66,8 +66,8 @@ in."
(let* ((version (let* ((version
(cdr (doom-call-process "git" "version"))) (cdr (doom-call-process "git" "version")))
(version (version
(and (string-match "\\_<[0-9]+\\.[0-9]+\\(\\.[0-9]+\\)\\_>" version) (and (string-match "git version \\([0-9]+\\(?:\\.[0-9]+\\)\\{2\\}\\)" version)
(match-string 0 version)))) (match-string 1 version))))
(if version (if version
(when (version< version "2.23") (when (version< version "2.23")
(error! "Git %s detected! Doom requires git 2.23 or newer!" (error! "Git %s detected! Doom requires git 2.23 or newer!"