test-utils: use remove_directory

This commit is contained in:
Dirk-Jan C. Binnema
2025-11-19 22:27:32 +02:00
committed by Seth Ladygo
parent d258c77661
commit ad327d3acb

View File

@ -137,10 +137,9 @@ Mu::TempDir::~TempDir()
return; return;
} }
if (auto&& res{run_command0({RM_PROGRAM, "-fr", path_})}; !res) { if (auto&& res{remove_directory(path_)}; !res) {
/* LCOV_EXCL_START*/ /* LCOV_EXCL_START*/
mu_warning("error removing {}: {}", path_, format_as(res.error())); mu_warning("error removing {}: {}", path_, format_as(res.error()));
/* LCOV_EXCL_STOP*/ /* LCOV_EXCL_STOP*/
} else }
mu_debug("removed '{}'", path_);
} }