quote issues fixed

This commit is contained in:
Mate Majoros 2026-01-13 12:04:08 +02:00
parent 86af18c90a
commit 55c02b1843

View file

@ -253,26 +253,26 @@ jobs:
echo \"Restoring from: \$DB_FILE\" echo \"Restoring from: \$DB_FILE\"
# Construct command dynamically to handle missing file backups # Construct command using array to handle arguments safely
CMD=\"bench --site ${{ github.event.inputs.site_name }} --force restore '\$DB_FILE'\" ARGS=(bench --site ${{ github.event.inputs.site_name }} --force restore \"\$DB_FILE\")
if [ -n \"\$PUBLIC_FILES\" ]; then if [ -n \"\$PUBLIC_FILES\" ]; then
echo \"With public files: \$PUBLIC_FILES\" echo \"With public files: \$PUBLIC_FILES\"
CMD=\"\$CMD --with-public-files '\$PUBLIC_FILES'\" ARGS+=(--with-public-files \"\$PUBLIC_FILES\")
else else
echo \"⚠️ No public files backup found, skipping files restore\" echo \"⚠️ No public files backup found, skipping files restore\"
fi fi
if [ -n \"\$PRIVATE_FILES\" ]; then if [ -n \"\$PRIVATE_FILES\" ]; then
echo \"With private files: \$PRIVATE_FILES\" echo \"With private files: \$PRIVATE_FILES\"
CMD=\"\$CMD --with-private-files '\$PRIVATE_FILES'\" ARGS+=(--with-private-files \"\$PRIVATE_FILES\")
else else
echo \"⚠️ No private files backup found, skipping private files restore\" echo \"⚠️ No private files backup found, skipping private files restore\"
fi fi
# Restore the database # Restore the database
echo \"Running: \$CMD\" echo \"Running: \${ARGS[*]}\"
eval \"\$CMD\" \"\${ARGS[@]}\"
echo \"✅ Database restored successfully\" echo \"✅ Database restored successfully\"
' '