From 7d2500f7f3f3e708d088cc5a7d9a3ae4f57df87b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Wed, 19 Jun 2024 15:14:25 +0200 Subject: [PATCH] helpers.v2.1: Add ynh_in_ci_tests to check if the scripts are running in CI or not --- helpers/helpers.v1.d/sources | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/helpers/helpers.v1.d/sources b/helpers/helpers.v1.d/sources index 247668b8c..d8805c493 100644 --- a/helpers/helpers.v1.d/sources +++ b/helpers/helpers.v1.d/sources @@ -267,8 +267,11 @@ ynh_setup_source() { for patchfile in "$patches_folder/"*.patch; do echo "$patchfile" if ! patch --strip=1 < "$patchfile"; then - ynh_print_warn --message="Warn your packagers /!\\ patch $patchfile failed to apply" - fi + if ynh_in_ci_tests; then + ynh_die --message"Patch $patchfile failed to apply!" + else + ynh_print_warn --message="Warn your packagers /!\\ patch $patchfile failed to apply" + fi fi done popd fi