helpers.v2.1: Add ynh_in_ci_tests to check if the scripts are running in CI or not

This commit is contained in:
Salamandar 2024-06-19 15:14:25 +02:00
parent f2696fddab
commit 7d2500f7f3

View file

@ -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