Add "sources" CLI arg to filter which sources are run during a command #287
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #286
This PR adds an array
-s/--sources
option to thecache
,status
,list
andnotices
commands to restrict which sources those commands operate over.The purpose of this is to accommodate repos that use dependencies from multiple sources but might only update one source at a time. For example you could run
bundle install && licensed cache --source bundler
, or set up a bundler post hook to run caching anytime packages are installed.This also fixes a subtle bug that was introduced when enabling shared cache paths. In prior versions, it was safe to put extra data under an applications
cache_path
, as long as it wasn't in an evaluated sources cache subdirectory. With that change any files undercache_path
that did not match to evaluated dependencies would be deleted. With this PR, that behavior is reverted 👍