1
0
mirror of https://github.com/Prowlarr/Indexers.git synced 2025-12-20 02:58:28 +00:00

Fix git pathspec error for non-existent schema.json files

The script was failing with 'pathspec did not match any file(s) known to git'
when trying to checkout schema.json files that don't exist. Now it checks
for file existence before attempting checkout.
This commit is contained in:
Servarr
2025-09-07 07:51:52 -05:00
parent ab59edc470
commit 3792bd34b9

View File

@@ -565,7 +565,15 @@ pull_cherry_and_merge() {
log "SUCCESS" "--- Completed cherry picking ---" log "SUCCESS" "--- Completed cherry picking ---"
log "INFO" "Evaluating and Reviewing Changes" log "INFO" "Evaluating and Reviewing Changes"
git checkout HEAD -- "definitions/v*/schema.json" # Checkout schema files if they exist - expand the glob pattern first
schema_files=$(find definitions -type f -name "schema.json" -path "*/v[0-9]*/schema.json" 2>/dev/null)
if [ -n "$schema_files" ]; then
for schema_file in $schema_files; do
git checkout HEAD -- "$schema_file" 2>/dev/null || true
done
else
log "DEBUG" "No schema.json files found to checkout"
fi
handle_new_indexers handle_new_indexers
handle_modified_indexers handle_modified_indexers