From 770fdb686138c9a05d63577e40f32343a5076e47 Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Fri, 15 Dec 2023 01:23:49 +0100 Subject: [PATCH] [fix] First source patches failure doesn't stop app script --- helpers/utils | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/helpers/utils b/helpers/utils index edbdbdc3a1..e16ddc70bf 100644 --- a/helpers/utils +++ b/helpers/utils @@ -351,13 +351,12 @@ ynh_setup_source() { if [ -d "$YNH_APP_BASEDIR/sources/patches/" ]; then local patches_folder=$(realpath $YNH_APP_BASEDIR/sources/patches/) if (($(find $patches_folder -type f -name "${source_id}-*.patch" 2>/dev/null | wc --lines) > "0")); then - ( - cd "$dest_dir" - for p in $patches_folder/${source_id}-*.patch; do - echo $p - patch --strip=1 <$p - done - ) || ynh_die --message="Unable to apply patches" + pushd "$dest_dir" + for p in $patches_folder/${source_id}-*.patch; do + echo $p + patch --strip=1 <$p || ynh_die --message="Unable to apply patches" + done + popd fi fi