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: introduce additional fall back if the user cache directory can't be used #215

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

PeterSchafer
Copy link
Contributor

@PeterSchafer PeterSchafer commented Jul 22, 2024

This PR introduces an additional fallback cache directory to increase fault tolerance of the Snyk CLI. When the first cache directory can't be used it'll try the tmp dir and later only the current dir.
This shall make the CLI function in environments that are very limited in their permissions.

Implementation detail:
I replaced a handwritten mock by a generated mock to easier test, which is why there are a couple of changes in the tests.

@PeterSchafer PeterSchafer changed the title fix: introduce additional fall back the user cache directory can't be used fix: introduce additional fall back if the user cache directory can't be used Jul 22, 2024
@PeterSchafer PeterSchafer marked this pull request as ready for review August 7, 2024 10:51
@PeterSchafer PeterSchafer requested a review from a team as a code owner August 7, 2024 10:51
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