From 5955a4c3f913d1aa77ec3a27d6430f3dcf22aab6 Mon Sep 17 00:00:00 2001 Message-ID: <5955a4c3f913d1aa77ec3a27d6430f3dcf22aab6.1713969693.git.zimon.toutoune@gmail.com> From: Simon Tournier Date: Wed, 24 Apr 2024 16:39:10 +0200 Subject: [PATCH] ci: Catch error for 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 --- guix/ci.scm | 11 +++++++---- 1 file 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 @@ (define (channel-with-substitutes-available chan url) 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)))) base-commit: 10d0e2d3110e4be2bc6cfecb9a3abb83d8e1ddd6 -- 2.41.0