aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tournier <zimon.toutoune@gmail.com>2024-04-24 16:39:10 +0200
committerSimon Tournier <zimon.toutoune@gmail.com>2024-07-23 16:24:38 +0200
commitffdcef5f36196f5e004ca6cb96f5accc0c73fc92 (patch)
tree17288ad79ba847da6847e3efaef7366ff8e0b531
parentae2591d02898a7219a084e646302465530896fe0 (diff)
downloadguix-ffdcef5f36196f5e004ca6cb96f5accc0c73fc92.tar.gz
guix-ffdcef5f36196f5e004ca6cb96f5accc0c73fc92.zip
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
-rw-r--r--guix/ci.scm11
1 files changed, 7 insertions, 4 deletions
diff --git a/guix/ci.scm b/guix/ci.scm
index 5d16ee69d0..b2077448b0 100644
--- a/guix/ci.scm
+++ b/guix/ci.scm
@@ -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
false and a warning message is printed."
- (let ((commit (find-latest-commit-with-substitutes url)))
- (unless commit
- (warning (G_ "could not find available substitutes at ~a~%")
- url))
+ (let ((commit (catch #t
+ (lambda ()
+ (find-latest-commit-with-substitutes url))
+ (lambda _
+ (warning (G_ "could not find available substitutes at ~a~%")
+ url)
+ #false))))
(channel
(inherit chan)
(commit commit))))