Closed Streemo closed 6 years ago
@Streemo which version of node and tmp are you using, which OS?
Normally, this should be handled automatically when you call tmp.setGracefulCleanup(), see https://github.com/raszi/node-tmp#graceful-cleanup
Otherwise, and this is for debugging, it will keep the temporary files on process exit.
node: 10.1.0 npm: 6.0.1 tmp: 0.0.33 os: MacOS 10.13.2 (high sierra)
The problem was that (even if setGracefulCleanup
was called), CTRL+C would not actually remove the tmp folders. The folders would be removed on process' natural exit, though. I think setGracefulCleanup
should try to remove all the junk created on any kind of exit (whether CTRL+C or natural exit, etc. but that's just my preference. Maybe a distinction between fullCleanup/forceCleanup and naturalCleanup for debugging purposes?
@Streemo so this is basically a dupe of #121. Closing. Feel free to try out the PR for #121: #159.
Apparently,
node-tmp
doesn't properly cleanup in some situations. It would be nice to have a method ontmp
like this:usage:
what i'll probably do currently (a hack...):