From 1e5133bda34cd67c7dc84a887bc4b7835dcba177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lex=20Ruiz?= Date: Thu, 7 Mar 2024 14:38:38 +0100 Subject: [PATCH] Fix error handling --- .github/workflows/r_test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/r_test.yml b/.github/workflows/r_test.yml index 6adabacdc1fcf..648b37bf20bda 100644 --- a/.github/workflows/r_test.yml +++ b/.github/workflows/r_test.yml @@ -49,17 +49,17 @@ jobs: - run: sudo systemctl daemon-reload - run: | - if sudo systemctl enable wazuh-indexer.service; then - sudo journalctl --no-pager -u wazuh-indexer.service - exit 1 + if ! sudo systemctl enable wazuh-indexer.service; then + sudo journalctl --no-pager -u wazuh-indexer.service + exit 1 fi - run: | - if sudo systemctl start wazuh-indexer; then + if ! sudo systemctl start wazuh-indexer; then sudo journalctl --no-pager -u wazuh-indexer.service exit 1 fi - run: | - if sudo systemctl status wazuh-indexer; then + if ! sudo systemctl status --no-pager wazuh-indexer -n 100; then sudo journalctl --no-pager -u wazuh-indexer.service exit 1 fi