fix: also fix find_model_files to use sys.argv

- Apply same sys.argv pattern to find_model_files function
- Ensures all Python heredocs avoid bash interpolation issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-22 16:09:11 +01:00
parent 02b7bedafb
commit 7d35471973

View File

@@ -310,14 +310,14 @@ find_model_files() {
local repo_id="$1"
local filename_filter="$2"
python3 - <<EOPYFINDFIND
python3 <<EOPYFINDFIND - "$CACHE_DIR" "$repo_id" "$filename_filter"
import os
import sys
from pathlib import Path
cache_dir = '${CACHE_DIR}'
repo_id = '${repo_id}'
filename_filter = '${filename_filter}'
cache_dir = sys.argv[1]
repo_id = sys.argv[2]
filename_filter = sys.argv[3]
# HuggingFace cache structure: cache_dir/models--org--name/snapshots/hash/
# Try both with and without 'hub/' subdirectory for compatibility