From 92205bab4dcf25a9c4dbe08daf0e53c6e608ca3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 26 Mar 2025 15:52:37 +0100 Subject: [PATCH] services: unattended-upgrade: Exit with non-zero upon failure. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Until now, the service would always exit with 0, which makes failures harder to distinguish in the output of ‘herd status’, for instance. * gnu/services/admin.scm (unattended-upgrade-shepherd-services)[code]: Call ‘exit’ after ‘report-invoke-error’. Change-Id: Idfc74a48a6a798e813db96d5770a897595b27240 --- gnu/services/admin.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm index e4737940438..fd57dc01519 100644 --- a/gnu/services/admin.scm +++ b/gnu/services/admin.scm @@ -644,7 +644,8 @@ which lets you search for packages that provide a given file.") (format #t "starting upgrade...~%") (guard (c ((invoke-error? c) - (report-invoke-error c))) + (report-invoke-error c) + (exit 1))) (apply invoke #$(file-append guix "/bin/guix") "time-machine" "-C" #$channels "--" "system" "reconfigure" #$arguments)