fix(cli): void-function directory-empty-p error

directory-empty-p was introduced in 28.1, but Doom still supports 27.1,
so 27.x users would see this error when running any bin/doom command
that clones packages.

Fix: #7779
Amend: 1fa8d3a4b9
This commit is contained in:
Henrik Lissner 2024-03-30 11:49:07 -04:00
parent 5f5a163c49
commit 3643c4dadd
No known key found for this signature in database
GPG Key ID: B60957CA074D39A3

View File

@ -339,8 +339,7 @@ list remains lean."
;; invocations, it will assume indicates a successful
;; clone (causing load errors later).
(let ((try 0))
(while (or (not (file-directory-p repo-dir))
(directory-empty-p repo-dir))
(while (not (file-directory-p (doom-path repo-dir ".git")))
(when (= try 3)
(error "Failed to clone package"))
(print! "Failed to clone %S, trying again (attempt #%d)..." package (1+ try))