fix(cli): don't regraft repo if no repo given
Otherwise you'll regraft $EMACSDIR, which could result in lost data for contributors.
This commit is contained in:
parent
cc3be7cb44
commit
fe2af3c344
1 changed files with 2 additions and 0 deletions
|
@ -510,6 +510,8 @@ declaration) or dependency thereof that hasn't already been."
|
||||||
(delq nil (mapcar #'doom--cli-packages-purge-build builds))))))
|
(delq nil (mapcar #'doom--cli-packages-purge-build builds))))))
|
||||||
|
|
||||||
(cl-defun doom--cli-packages-regraft-repo (repo)
|
(cl-defun doom--cli-packages-regraft-repo (repo)
|
||||||
|
(unless repo
|
||||||
|
(error "No repo specified for regrafting"))
|
||||||
(let ((default-directory (straight--repos-dir repo)))
|
(let ((default-directory (straight--repos-dir repo)))
|
||||||
(unless (file-directory-p ".git")
|
(unless (file-directory-p ".git")
|
||||||
(print! (warn "\033[Krepos/%s is not a git repo, skipping" repo))
|
(print! (warn "\033[Krepos/%s is not a git repo, skipping" repo))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue