Skip to content

Commit

Permalink
Add restart to remove failing source
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinmera committed Aug 3, 2024
1 parent ba27193 commit 347a866
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions project.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ Versions:~12t~a~%"
(loop for source in (sources project)
do (restart-case (return (apply #'checkout source path :version version args))
(continue ()
:report "Try the next source."))
:report "Try the next source.")
(remove ()
:report "Remove the source and try the next one."
(setf (sources project) (remove source (sources project)))))
finally (error "No capable source to clone~% ~a" project))))

(defmethod update ((project project) &rest args &key version &allow-other-keys)
Expand All @@ -177,7 +180,10 @@ Versions:~12t~a~%"
(loop for source in (sources project)
do (restart-case (return (apply #'update source args))
(continue ()
:report "Try the next source."))
:report "Try the next source.")
(remove ()
:report "Remove the source and try the next one."
(setf (sources project) (remove source (sources project)))))
finally (cerror "Ignore the update failure." "No capable source to update~% ~a"
project))
(let ((release (find-release (version project) project)))
Expand All @@ -192,7 +198,10 @@ Versions:~12t~a~%"
(loop for source in (sources project)
do (restart-case (return (apply #'clone source args))
(continue ()
:report "Try the next source."))
:report "Try the next source.")
(remove ()
:report "Remove the source and try the next one."
(setf (sources project) (remove source (sources project)))))
finally (error "No capable source to clone~% ~a" project))))

(defmethod version ((project project))
Expand Down

0 comments on commit 347a866

Please sign in to comment.