Fix #5093: git version doctor check on macOS
git version's output is formatted differently on macOS (because of course it is), so I use a more flexible check.
This commit is contained in:
parent
daa50557a4
commit
7b5baf319b
1 changed files with 11 additions and 6 deletions
|
@ -62,12 +62,17 @@ in."
|
|||
(print-group!
|
||||
(if (not (executable-find "git"))
|
||||
(error! "Couldn't find git on your machine! Doom's package manager won't work.")
|
||||
(let ((version (cadr (split-string
|
||||
(cdr (doom-call-process "git" "version"))
|
||||
" version "))))
|
||||
(when (version< version "2.28")
|
||||
(error! "Git %s detected! Doom requires git 2.28 or newer!"
|
||||
version))))
|
||||
(save-match-data
|
||||
(let* ((version
|
||||
(cdr (doom-call-process "git" "version")))
|
||||
(version
|
||||
(and (string-match "\\_<[0-9]+\\.[0-9]+\\(\\.[0-9]+\\)\\_>" version)
|
||||
(match-string 0 version))))
|
||||
(if version
|
||||
(when (version< version "2.28")
|
||||
(error! "Git %s detected! Doom requires git 2.28 or newer!"
|
||||
version))
|
||||
(warn! "Cannot determine Git version. Doom requires git 2.28 or newer!")))))
|
||||
|
||||
(unless (executable-find "rg")
|
||||
(error! "Couldn't find the `rg' binary; this a hard dependecy for Doom, file searches may not work at all")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue