Skip to content
New issue

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

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

Already on GitHub? # to your account

Improve preserve cache #1382

Merged
merged 5 commits into from
Dec 2, 2020
Merged

Improve preserve cache #1382

merged 5 commits into from
Dec 2, 2020

Conversation

cryptonemo
Copy link
Collaborator

Window post bench preserve_cache option should only be used on new/non-existent cache dirs. This check enforces this.

This PR also removes an unrelated unused argument.

// If 'preserve_cache' is specified, the 'cache' option must be specified and must not exist on disk.
if preserve_cache {
ensure!(
cache_dir_specified && !Path::new(&PathBuf::from(&cache)).exists(),
Copy link
Contributor

Choose a reason for hiding this comment

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

you shouldn’t need the Path::new

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, didn't realize!

@cryptonemo cryptonemo merged commit 88d1af8 into master Dec 2, 2020
@cryptonemo cryptonemo deleted the fix-preserve-cache branch December 2, 2020 15:57
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants