diff --git a/lib/App/Yath.pm b/lib/App/Yath.pm index b2c914088..c294721ef 100644 --- a/lib/App/Yath.pm +++ b/lib/App/Yath.pm @@ -658,7 +658,10 @@ sub handle_debug { $exit //= 0; } - exit($exit) if defined $exit; + if (defined $exit) { + remove_tree($settings->workspace->workdir, {safe => 1, keep_root => 0}) if $settings->check_group('workspace'); + exit($exit); + } } sub page_out {