From ab70baca59e86b4fffda5c0594f3b5b69c6666d2 Mon Sep 17 00:00:00 2001 From: circus <157195075+circus1990666@users.noreply.github.com> Date: Mon, 18 Aug 2025 11:09:56 +0800 Subject: [PATCH] fix: remove incorrect else branch causing flatten command regression (#452) This fixes a regression bug where the flatten command would fail with an error message even when valid arguments were provided. The bug was: - First introduced in commit 0fdbca7 - Fixed in commit fab9d5e (v5.0.0-beta.2) - Accidentally reintroduced in commit ed53943 The else branch at lines 130-134 was incorrectly handling the case when users provided arguments, showing a misleading error about 'no arguments provided' when arguments were actually present. Fixes all flatten command variations: - npx bmad-method flatten - npx bmad-method flatten --input /path - npx bmad-method flatten --output file.xml - npx bmad-method flatten --input /path --output file.xml Co-authored-by: Brian --- tools/flattener/main.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tools/flattener/main.js b/tools/flattener/main.js index c603126a..50a831bf 100644 --- a/tools/flattener/main.js +++ b/tools/flattener/main.js @@ -115,11 +115,6 @@ program path.join(inputDir, 'flattened-codebase.xml'), ); } - } else { - console.error( - 'Could not auto-detect a project root and no arguments were provided. Please specify -i/--input and -o/--output.', - ); - process.exit(1); } // Ensure output directory exists