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

remove temp.zip after usage when downloading examples #2372

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

iMezemz
Copy link

@iMezemz iMezemz commented Nov 28, 2024

closes #2322

  • remove temp.zip after usage

Copy link
Contributor

@slinkydeveloper slinkydeveloper left a comment

Choose a reason for hiding this comment

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

Looks good! I just left a small comment, will test locally and then we're good

@@ -193,6 +193,9 @@ async fn download_example(repo_handler: RepoHandler<'_>, asset: Asset) -> Result
return Err(e);
}

// Remove the zip file
let _ = tokio::fs::remove_file(&zip_out_file_path).await;
Copy link
Contributor

Choose a reason for hiding this comment

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

If there is an error, I would print a message with something along the lines of "Couldn't cleanup the temp.zip" or similar.

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.

[CLI] Remove temp.zip when downloading examples
2 participants