From 7638d528ef882e87de67edcf9e8db54bd5450385 Mon Sep 17 00:00:00 2001 From: Heaven Date: Thu, 7 May 2026 16:57:47 +0200 Subject: [PATCH] Better clean :) --- src/Output.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Output.cpp b/src/Output.cpp index c13cb32..30542d6 100644 --- a/src/Output.cpp +++ b/src/Output.cpp @@ -40,14 +40,19 @@ namespace Output { void printArgClean() { 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(entry.path()); - } + std::filesystem::remove_all(dirPath); + // for (const auto& entry : std::filesystem::directory_iterator(dirPath)) { + // std::filesystem::remove_all(entry.path()); + // } fmt::print(fmt::fg(fmt::color::light_green), - "[Lazymake] Cleaned up build directory!\n" + "[Lazymake] Cleaned up build directory :D\n" ); }