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

Explicit cleanup operation #298

Open
kibertoad opened this issue Jun 2, 2024 · 2 comments
Open

Explicit cleanup operation #298

kibertoad opened this issue Jun 2, 2024 · 2 comments

Comments

@kibertoad
Copy link

Tmp Version

0.2.3

Expected Behavior

It would be great if tmp exposed a synchronous cleanup operation, which would remove all the controlled files when called. This method could be used in afterEach test blocks.

Experienced Behavior

Currently only setGracefulCleanup method exists, which does not work reliably with test runners.

@silkentrance
Copy link
Collaborator

depending on your host operating system, the cleanup operation might also not work as some os tend to keep locks on files.
so, we cannot do anything about that.

@raszi
Copy link
Owner

raszi commented Jun 24, 2024

I welcome the idea, which aligns with what I considered doing in the TypeScript refactor branch.

Of course, the dependent would need to close the file descriptors to be able to do this, but that is also the case for the graceful cleanup feature, that I would like to sunset.

@raszi raszi reopened this Jun 24, 2024
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

No branches or pull requests

3 participants