Skip to content

Commit 56c67c0

Browse files
committed
chore: Remove comment for issue #11
1 parent 596dffd commit 56c67c0

File tree

1 file changed

+9
-18
lines changed

1 file changed

+9
-18
lines changed

lisp/_prepare.el

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ The optional argument URL-OR-PACKAGE is used in the function `try'."
804804
(defun eask--package-delete-before-install (pkg force)
805805
"Make sure PKG is not presented before installing the latest.
806806
807-
The argument SHOULD-REINSTALL-P is the permit for this operation."
807+
The argument FORCE is passed through to the `package-delete' function."
808808
;; Recipe can be `nil', handle it.
809809
(when-let* ((rcp (eask-package-desc pkg t)))
810810
(package-delete rcp force)
@@ -852,15 +852,8 @@ The argument SHOULD-REINSTALL-P is the permit for this operation."
852852
;; Handle `--force` flag.
853853
(when should-reinstall-p
854854
(eask--package-delete-before-install pkg t))
855-
;; XXX: Without ignore-errors guard, it will trigger error
856-
;;
857-
;; Can't find library xxxxxxx.el
858-
;;
859-
;; But we can remove this after Emacs 28, since function `find-library-name'
860-
;; has replaced the function `signal' instead of the `error'.
861-
;;
862855
;; Install it.
863-
(eask-ignore-errors (package-install-file (expand-file-name file))))
856+
(package-install-file (expand-file-name file)))
864857
"done ✓")))))
865858

866859
(defun eask-package-install (pkg)
@@ -887,15 +880,9 @@ The argument SHOULD-REINSTALL-P is the permit for this operation."
887880
;; Handle `--force` flag.
888881
(when should-reinstall-p
889882
(eask--package-delete-before-install pkg t))
890-
;; XXX: Without ignore-errors guard, it will trigger error
891-
;;
892-
;; Can't find library xxxxxxx.el
893-
;;
894-
;; But we can remove this after Emacs 28, since function `find-library-name'
895-
;; has replaced the function `signal' instead of the `error'.
896-
;;
897883
;; Install it.
898-
(eask-ignore-errors (package-install pkg)))
884+
(let ((current-prefix-arg (eask-force-p)))
885+
(package-install pkg)))
899886
"done ✓"))))))
900887

901888
(defun eask-package-delete (pkg)
@@ -936,7 +923,8 @@ The argument SHOULD-REINSTALL-P is the permit for this operation."
936923
(format " - %sReinstalling %s (%s)... " eask--action-prefix name version)
937924
(eask-with-verbosity 'debug
938925
(eask--package-delete-before-install pkg t)
939-
(eask-ignore-errors (package-install pkg)))
926+
(let ((current-prefix-arg (eask-force-p)))
927+
(package-install pkg)))
940928
"done ✓"))))))
941929

942930
(defun eask-package-desc (name &optional current)
@@ -2029,6 +2017,9 @@ Argument ARGS are direct arguments for functions `eask-error' or `eask-warn'."
20292017
20302018
The argument ARGS is passed from the function `eask--error'."
20312019
(cond ((< emacs-major-version 28)
2020+
;; But we can remove this after Emacs 28, since function `find-library-name'
2021+
;; has replaced the function `signal' instead of the `error'.
2022+
;;
20322023
;; Handle https://github.com/emacs-eask/cli/issues/11.
20332024
(unless (string-prefix-p "Can't find library " (car args))
20342025
(setq eask--has-error-p t)))

0 commit comments

Comments
 (0)