Skip to content

Commit 37f7d32

Browse files
committed
helpers.v2.1: ynh_setup_source now fails in CI if patches can't apply
1 parent 0c1ec27 commit 37f7d32

File tree

1 file changed

+5
-1
lines changed
  • helpers/helpers.v2.1.d

1 file changed

+5
-1
lines changed

helpers/helpers.v2.1.d/utils

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,11 @@ ynh_setup_source() {
314314
for patchfile in "$patches_folder/"*.patch; do
315315
echo "$patchfile"
316316
if ! patch --strip=1 < "$patchfile"; then
317-
ynh_print_warn --message="Warn your packagers /!\\ patch $patchfile failed to apply"
317+
if ynh_in_ci_tests; then
318+
ynh_die --message"Patch $patchfile failed to apply!"
319+
else
320+
ynh_print_warn --message="Warn your packagers /!\\ patch $patchfile failed to apply"
321+
fi
318322
fi
319323
done
320324
popd

0 commit comments

Comments
 (0)