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

Clean-up temp folders on failure #3

Open
Maxim-Mazurok opened this issue Sep 22, 2022 · 0 comments
Open

Clean-up temp folders on failure #3

Maxim-Mazurok opened this issue Sep 22, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@Maxim-Mazurok
Copy link
Owner

Related to #2
We could do try/catch and clean in catch, but it's quite handy to have these folders after failure because I can open them and see what went wrong, experiment, etc. Perhaps, do a cleanup at the start? But then TempFolderManager is kinda redundant... we can preserve all temp folders that we've created into some log file and then use this log at the startup to make sure we delete all folders created before.
A much simpler solution would be to delete all dev-bench_* and npm_cache_* folders.
Perhaps we could re-purpose TempFolderManager to register friendly names so that we know which patterns to clean. This will have to be done at the "DI" stage.
We'll have to refactor nodeenv to be a class, and then pass the TempFolderManager instance to nodeenv's constructor, which will register its temp folder friendly name there: "npm_cache".

@Maxim-Mazurok Maxim-Mazurok added the enhancement New feature or request label Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant