fix(cli): deploy git hooks to repo at $PWD, not $EMACSDIR
This commit is contained in:
parent
d002e4c89d
commit
b81e4af66a
1 changed files with 8 additions and 5 deletions
|
@ -266,11 +266,14 @@ Note: warnings are not considered failures.")
|
||||||
|
|
||||||
(defcli! (ci deploy-hooks) ((force ("--force")))
|
(defcli! (ci deploy-hooks) ((force ("--force")))
|
||||||
"TODO"
|
"TODO"
|
||||||
(let* ((default-directory doom-emacs-dir)
|
(let* ((repo-path (sh! "git" "rev-parse" "--show-toplevel"))
|
||||||
(repo-path (cdr (doom-call-process "git" "rev-parse" "--show-toplevel")))
|
(repo-path (if (zerop (car repo-path))
|
||||||
(submodule-p (string-empty-p (cdr (doom-call-process "git" "rev-parse" "show-superproject-working-tree"))))
|
(cdr repo-path)
|
||||||
(config-hooks-path (cdr (doom-call-process "git" "config" "core.hooksPath")))
|
(user-error "Cannot locate a git repo in %s"
|
||||||
(hooks-path (cdr (doom-call-process "git" "rev-parse" "--git-path" "hooks"))))
|
(file-relative-name default-directory))))
|
||||||
|
(submodule-p (string-empty-p (cdr (sh! "git" "rev-parse" "show-superproject-working-tree"))))
|
||||||
|
(config-hooks-path (cdr (sh! "git" "config" "core.hooksPath")))
|
||||||
|
(hooks-path (cdr (sh! "git" "rev-parse" "--git-path" "hooks"))))
|
||||||
(unless (string-empty-p config-hooks-path)
|
(unless (string-empty-p config-hooks-path)
|
||||||
(or force
|
(or force
|
||||||
(y-or-n-p
|
(y-or-n-p
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue