openresty / resty-cli

Fancy command-line utilities for OpenResty
http://openresty.org
263 stars 64 forks source link

bugfix: resty: the tmp directory has not been deleted. #58

Closed xiaocang closed 4 years ago

xiaocang commented 4 years ago

In the subprocess, exec() in Perl are used.

Note that exec will not call your END blocks, nor will it invoke DESTROY methods on your objects.

The subprocess does not call the code in the END block, so the temporary directories are never deleted. So I changed the conditions so that it's always the parent process that deletes the temporary directory.