From cfd001ac2de9e973b51600b0ffb2aae81a54c7a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Klime=C5=A1?= <xklimes5@fi.muni.cz>
Date: Fri, 5 Nov 2021 14:54:46 +0100
Subject: [PATCH] cron: fix warn message

---
 cron.pl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/cron.pl b/cron.pl
index c6b0f70..e24bdfc 100755
--- a/cron.pl
+++ b/cron.pl
@@ -32,8 +32,10 @@ for my $item (@files) {
 }
 
 for my $printer (@files) {
-    system("$REPO/install.pl --update $printer")
-        or warn "Error while updating $printer";
+    system("$REPO/install.pl --update $printer");
+    if ($? != 0) {
+        warn "Error while updating $printer";
+    }
 }
 
 
-- 
GitLab