Fixed check for .git dir.

This commit is contained in:
Alexander Artemenko 2021-02-06 16:42:47 +03:00
parent 7772f6f8c7
commit 5d2a6db1c2

View file

@ -55,9 +55,10 @@ behaviour could be overriden by keyword argument ``:raise t``."
(values stdout stderr code))) (values stdout stderr code)))
(defun gh-pages-repository-initialized-p () (defun gh-pages-repository-initialized-p (docs-dir)
"Checks if repository for documentation already initialized" "Checks if repository for documentation already initialized"
(uiop:directory-exists-p "docs/build/.git")) (uiop:directory-exists-p (uiop:merge-pathnames* #P".git/"
docs-dir)))
(defun git (&rest commands) (defun git (&rest commands)
@ -123,7 +124,7 @@ behaviour could be overriden by keyword argument ``:raise t``."
(let ((*current-dir* docs-dir)) (let ((*current-dir* docs-dir))
(unless (gh-pages-repository-initialized-p) (unless (gh-pages-repository-initialized-p docs-dir)
(git "init") (git "init")
(git "remote add origin " (git "remote add origin "