Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix --delete in huggingface-cli upload command #2129

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Mar 19, 2024

This PR fixes a bug when path_in_repo="." or path_in_repo="./" is passed along delete_patterns in upload_folder. In particular it fixes the --delete flag when running huggingface-cli upload command.

First reported by @Cadene.

@Wauplin Wauplin requested a review from Cadene March 19, 2024 15:13
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

if path_in_repo:
if path_in_repo and path_in_repo not in (".", "./"):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good catch! LGTM

@Wauplin Wauplin merged commit 57ee5fc into main Mar 20, 2024
15 of 16 checks passed
@Wauplin Wauplin deleted the fix-huggingface-cli-upload-delete branch March 20, 2024 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants