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

Do not delete skipped sources' cache #401

Merged
merged 1 commit into from
Sep 14, 2021
Merged

Conversation

jonabc
Copy link
Contributor

@jonabc jonabc commented Sep 13, 2021

In a recent refactor I introduced a bug where setting licensed cache --source <source> would unintentionally delete the cached files from all other sources 🤦 .

The underlying issue came from moving the check on whether a source was skipped into the base command class. When the check was moved there was no longer any indication that the cache path shouldn't be cleaned for unused dependencies, and because no dependencies from the source were evaluated they are all determined to be unused.

This change has the base command implementation return a symbol :skipped instead of true, so that sources extending the default behavior are aware of this case. The symbol is truthy and will result in the source evaluation being considered a success

@jonabc jonabc merged commit 9a067a5 into master Sep 14, 2021
@jonabc jonabc deleted the sources-option-deleting-files branch September 14, 2021 15:39
jonabc added a commit that referenced this pull request Sep 14, 2021
## 3.2.3

2021-09-14

### Fixed

- Bundler source will no longer infinitely recurse when enumerating specifications (#402)
- Using the `--sources` command line option will no longer delete skipped sources' cached files (#401)
@jonabc jonabc mentioned this pull request Sep 14, 2021
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.

1 participant