Better clean :)

This commit is contained in:
2026-05-07 16:57:47 +02:00
parent 6584a6f0e4
commit 7638d528ef

View File

@@ -40,14 +40,19 @@ namespace Output {
void printArgClean() { void printArgClean() {
std::filesystem::path dirPath = "build"; std::filesystem::path dirPath = "build";
if (!std::filesystem::exists(dirPath) || !std::filesystem::is_directory(dirPath)) return; if (!std::filesystem::exists(dirPath) || !std::filesystem::is_directory(dirPath)) {
fmt::print(fmt::fg(fmt::color::light_coral),
"[Lazymake] Cleanup failed. Nothing to clean :(\n"
);
};
for (const auto& entry : std::filesystem::directory_iterator(dirPath)) { std::filesystem::remove_all(dirPath);
std::filesystem::remove_all(entry.path()); // for (const auto& entry : std::filesystem::directory_iterator(dirPath)) {
} // std::filesystem::remove_all(entry.path());
// }
fmt::print(fmt::fg(fmt::color::light_green), fmt::print(fmt::fg(fmt::color::light_green),
"[Lazymake] Cleaned up build directory!\n" "[Lazymake] Cleaned up build directory :D\n"
); );
} }