ci: Catch error for unreachable channel with substitutes.

* guix/ci.scm (channel-with-substitutes-available): Catch all error when
running 'find-latest-commit-with-substitutes'.  Move the warning when failing.

Change-Id: I352e07f14417f77c7ebf0f40a01c6a2e58b15d78
This commit is contained in:
Simon Tournier 2024-04-24 16:39:10 +02:00
parent ae2591d028
commit ffdcef5f36
No known key found for this signature in database
GPG Key ID: 92F1D22C608EE7E5

View File

@ -336,10 +336,13 @@ URL. The current system is taken into account.
If no commit with available substitutes were found, the commit field is set to If no commit with available substitutes were found, the commit field is set to
false and a warning message is printed." false and a warning message is printed."
(let ((commit (find-latest-commit-with-substitutes url))) (let ((commit (catch #t
(unless commit (lambda ()
(warning (G_ "could not find available substitutes at ~a~%") (find-latest-commit-with-substitutes url))
url)) (lambda _
(warning (G_ "could not find available substitutes at ~a~%")
url)
#false))))
(channel (channel
(inherit chan) (inherit chan)
(commit commit)))) (commit commit))))