2.1 helpers: check if the patches directory exists before trying to get its realpath

This commit is contained in:
OniriCorpe 2024-08-28 23:03:57 +02:00
parent 3d4804be68
commit 488f563b45

View file

@ -224,8 +224,8 @@ ynh_setup_source() {
fi fi
# Apply patches # Apply patches
if [ -d "$YNH_APP_BASEDIR/patches/" ]; then
local patches_folder=$(realpath "$YNH_APP_BASEDIR/patches/$source_id") local patches_folder=$(realpath "$YNH_APP_BASEDIR/patches/$source_id")
if [ -d "$patches_folder" ]; then
pushd "$dest_dir" pushd "$dest_dir"
for patchfile in "$patches_folder/"*.patch; do for patchfile in "$patches_folder/"*.patch; do
echo "Applying $patchfile" echo "Applying $patchfile"