Skip to content

Commit db2c656

Browse files
committed
fix(ci): allow first verified Space bundle migration
1 parent 741f4b6 commit db2c656

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎.github/workflows/deploy-hf-space.yml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,14 @@ jobs:
8383
exit 1
8484
fi
8585
actual_paths="$(cd "$preflight_dir" && find . -type f ! -path './.cache/huggingface/*' -print | LC_ALL=C sort | cut -c3-)"
86-
if [[ "$actual_paths" != "$expected_paths" ]]; then
86+
unexpected_paths="$(comm -23 \
87+
<(printf '%s\n' "$actual_paths") \
88+
<(printf '%s\n' "$expected_paths"))"
89+
if [[ -n "$unexpected_paths" ]]; then
8790
printf '%s\n%s\n' \
88-
'Refusing to upload: the current Space repository is not exactly the verified wrapper boundary.' \
91+
'Refusing to upload: the current Space repository contains files outside the verified wrapper boundary.' \
8992
'This workflow never deletes legacy files. Migrate to a clean Space repository or perform a separately approved, reviewed cleanup before retrying.' >&2
93+
printf 'Unexpected path: %s\n' "$unexpected_paths" >&2
9094
exit 1
9195
fi
9296

0 commit comments

Comments
 (0)