fix(cli): deploy git hooks to correct directory

'doom install' now consults git to find the hooks directory, which will
work for users who have Doom as a submodule (#5632).

Fix #5632
This commit is contained in:
Henrik Lissner 2021-10-18 01:03:56 +02:00
parent ff854157a6
commit 1a86b0fc0f

View file

@ -14,8 +14,8 @@
(defun doom-cli--ci-deploy-hooks (&optional noforce) (defun doom-cli--ci-deploy-hooks (&optional noforce)
(let ((dir (doom-path doom-emacs-dir ".git/hooks")) (let* ((default-directory doom-emacs-dir)
(default-directory doom-emacs-dir)) (dir (cdr (doom-call-process "git" "rev-parse" "--git-path" "hooks"))))
(make-directory dir 'parents) (make-directory dir 'parents)
(dolist (hook '("commit-msg" "pre-push")) (dolist (hook '("commit-msg" "pre-push"))
(let ((file (doom-path dir hook))) (let ((file (doom-path dir hook)))