Skip to content

Commit

Permalink
[fix] First source patches failure doesn't stop app script
Browse files Browse the repository at this point in the history
  • Loading branch information
zamentur committed Dec 15, 2023
1 parent c0337bf commit 770fdb6
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions helpers/utils
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 770fdb6

Please sign in to comment.