From 75309545296d09c040b1a063be566a2369794904 Mon Sep 17 00:00:00 2001 From: Jorijn van der Graaf Date: Tue, 6 Oct 2026 18:08:26 +0200 Subject: [PATCH] fix(cli): `format clean` no longer deletes bin/ and build/ Every verb is a bare word that is only read as a verb while no conflicting verb is active; after one, the same word is a glob. The guard on `clean` checked the test and lint verbs and then itself, where the format verb was meant. `crafter-build format clean`, which asks for the rules matching "clean", therefore removed both trees and exited 0 without formatting anything. The guard now names format, like the three beside it. Co-Authored-By: Claude Fable 5.1 --- implementations/Crafter.Build-Clang.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/implementations/Crafter.Build-Clang.cpp b/implementations/Crafter.Build-Clang.cpp index d10b158..3c48078 100644 --- a/implementations/Crafter.Build-Clang.cpp +++ b/implementations/Crafter.Build-Clang.cpp @@ -1712,7 +1712,7 @@ std::int32_t Crafter::Run(std::int32_t argc, char** argv) { runTests = true; } else if (!runTests && !runFormat && !runClean && arg == "lint") { runLint = true; - } else if (!runTests && !runLint && !runClean && arg == "clean") { + } else if (!runTests && !runLint && !runFormat && arg == "clean") { runClean = true; } else if (!runTests && !runLint && !runClean && arg == "format") { runFormat = true;