You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe "truffle git git-url" command will need to store the git repo/info into a local temporary path, so where is the path and what is the recommended way to modify it? thanks
The text was updated successfully, but these errors were encountered:
You can change it using the TMPDIR environment variable. If TMPDIR is not set, you can fall back to TEMP or TMP, though in my experience, most users rely on TMPDIR.
EDIT: For clarity, TMPDIR is the directory where the repository is cloned before being scanned. You can see this in the code here. The CloneRepo function passes the clonePath parameter, which is created using os.MkdirTmp. This function relies on one of the environment variables mentioned above.
where is the path and what is the recommended way to modify it?
I think this is an enhancement request.
The answer to the question is technically you can't modify the directory in a meaningful way; being able to do so could be useful (e.g., persist cloned repositories after scanning).
You can change it using the TMPDIR environment variable. If TMPDIR is not set, you can fall back to TEMP or TMP, though in my experience, most users rely on TMPDIR.
EDIT: For clarity, TMPDIR is the directory where the repository is cloned before being scanned. You can see this in the code here. The CloneRepo function passes the clonePath parameter, which is created using os.MkdirTmp. This function relies on one of the environment variables mentioned above.
Thanks, I guess this is the code that created temp path here using os.MkdirTemp. I personally feel it might be useful to let user choose where to save instead of just the default system temp path (as what @rgmz suggested). e.g. To integrate trufflehog to my backend, one may need to know exactly where the temp files are stored in docker or cloud server.
I believe "truffle git git-url" command will need to store the git repo/info into a local temporary path, so where is the path and what is the recommended way to modify it? thanks
The text was updated successfully, but these errors were encountered: