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

Auto Create 'tracked' Directory #70

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

Conversation

nick-hunter
Copy link

I spent some time today trying to setup detect-secrets-server and ran into some issues. I'm using s3 for storage and running inside a Bamboo build environment. I added the tracked repositories on my dev machine, and then tried to run the tool in Bamboo.

I kept getting this error, no matter if I manually set the root directory or not.

FileNotFoundError: [Errno 2] No such file or directory: '/home/tracked/1c3b04fc...8f.json.92578130'

After debugging locally, I realized that the tracked subdirectory wasn't being created automatically. It seems like this dir only gets created when adding a repo. This PR adds additional logging, and tries to create the directory if it doesn't exist. If the tracked directory doesn't exist, all files downloaded from s3 will fail to save locally.

I know this tool is setup to use cron, but apart from small gaps like this, there is very little to hold others back from using s3 and running the tool on an ephemeral instance. Thanks for all of your work building this great tool!

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