Skip to content

Commit

Permalink
Throw error if git < 2.28
Browse files Browse the repository at this point in the history
To prevent issues like doomemacs#5096.
  • Loading branch information
hlissner committed May 25, 2021
1 parent 364e74a commit b074133
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions core/core-packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,17 @@ uses a straight or package.el command directly).")
(lambda (&rest args)
(message "%s" (cdr (apply #'doom-call-process args)))))))
(unless (file-directory-p repo-dir)
(save-match-data
(unless (executable-find "git")
(user-error "Git isn't present on your system. Cannot proceed."))
(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")
(user-error "Git %s detected! Doom requires git 2.28 or newer!"
version)))))
(print! (start "Installing straight..."))
(print-group!
(cl-destructuring-bind (depth . options)
Expand Down

0 comments on commit b074133

Please sign in to comment.