Reduce verbosity of first-time install
This commit is contained in:
parent
b0741336d1
commit
4563f13ef9
1 changed files with 10 additions and 7 deletions
|
@ -122,7 +122,7 @@ uses a straight or package.el command directly).")
|
||||||
(lambda (&rest args)
|
(lambda (&rest args)
|
||||||
(print! "%s" (cdr (apply #'doom-call-process args))))
|
(print! "%s" (cdr (apply #'doom-call-process args))))
|
||||||
(lambda (&rest args)
|
(lambda (&rest args)
|
||||||
(message "%s" (cdr (apply #'doom-call-process args)))))))
|
(apply #'doom-call-process args)))))
|
||||||
(unless (file-directory-p repo-dir)
|
(unless (file-directory-p repo-dir)
|
||||||
(save-match-data
|
(save-match-data
|
||||||
(unless (executable-find "git")
|
(unless (executable-find "git")
|
||||||
|
@ -159,14 +159,16 @@ uses a straight or package.el command directly).")
|
||||||
"--branch" straight-repository-branch))
|
"--branch" straight-repository-branch))
|
||||||
(make-directory repo-dir 'recursive)
|
(make-directory repo-dir 'recursive)
|
||||||
(let ((default-directory repo-dir))
|
(let ((default-directory repo-dir))
|
||||||
|
;; git init's -b switch was introduced in 2.28. As much as I'd
|
||||||
|
;; like to, the dependency is unavoidable because straight.el
|
||||||
|
;; uses it internally.
|
||||||
(funcall call "git" "init" "-b" straight-repository-branch)
|
(funcall call "git" "init" "-b" straight-repository-branch)
|
||||||
(funcall call "git" "remote" "add" "origin" repo-url
|
(funcall call "git" "remote" "add" "origin" repo-url
|
||||||
"--master" straight-repository-branch)
|
"--master" straight-repository-branch)
|
||||||
(funcall call "git" "fetch" "origin" pin
|
(funcall call "git" "fetch" "origin" pin
|
||||||
"--depth" (number-to-string depth)
|
"--depth" (number-to-string depth)
|
||||||
"--no-tags")
|
"--no-tags")
|
||||||
(funcall call "git" "reset" "--hard" pin)))))))
|
(funcall call "git" "reset" "--hard" pin)))))))))
|
||||||
(print! (success "Done!"))))
|
|
||||||
(require 'straight (concat repo-dir "/straight.el"))
|
(require 'straight (concat repo-dir "/straight.el"))
|
||||||
(doom-log "Initializing recipes")
|
(doom-log "Initializing recipes")
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
|
@ -185,11 +187,12 @@ uses a straight or package.el command directly).")
|
||||||
(straight-override-recipe (cons name recipe))
|
(straight-override-recipe (cons name recipe))
|
||||||
(when-let (local-repo (plist-get recipe :local-repo))
|
(when-let (local-repo (plist-get recipe :local-repo))
|
||||||
(setq repo local-repo)))
|
(setq repo local-repo)))
|
||||||
;; Only clone the package, don't build them. Straight hasn't been fully
|
(print-group!
|
||||||
;; configured by this point.
|
;; Only clone the package, don't build them. Straight hasn't been fully
|
||||||
(straight-use-package name nil t)
|
;; configured by this point.
|
||||||
|
(straight-use-package name nil t))
|
||||||
;; In case the package hasn't been built yet.
|
;; In case the package hasn't been built yet.
|
||||||
(or (member (directory-file-name (straight--build-dir "straight"))
|
(or (member (directory-file-name (straight--build-dir (symbol-name name)))
|
||||||
load-path)
|
load-path)
|
||||||
(add-to-list 'load-path (directory-file-name (straight--repos-dir repo)))))))
|
(add-to-list 'load-path (directory-file-name (straight--repos-dir repo)))))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue