Better clean :)
This commit is contained in:
@@ -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"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user