From ab2e94608749a2f148118daa0443bd32bca6e7a1 Mon Sep 17 00:00:00 2001 From: Ben Vargas Date: Wed, 16 Jul 2025 01:24:06 -0600 Subject: [PATCH] fix: show command no longer requires complexity report to exist (#979) Co-authored-by: Ben Vargas --- .changeset/fix-show-command-complexity.md | 7 +++++++ scripts/modules/commands.js | 12 ++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 .changeset/fix-show-command-complexity.md diff --git a/.changeset/fix-show-command-complexity.md b/.changeset/fix-show-command-complexity.md new file mode 100644 index 00000000..c73e131d --- /dev/null +++ b/.changeset/fix-show-command-complexity.md @@ -0,0 +1,7 @@ +--- +"task-master-ai": patch +--- + +Fix: show command no longer requires complexity report file to exist + +The `tm show` command was incorrectly requiring the complexity report file to exist even when not needed. Now it only validates the complexity report path when a custom report file is explicitly provided via the -r/--report option. \ No newline at end of file diff --git a/scripts/modules/commands.js b/scripts/modules/commands.js index 4dabf8a7..f68d4706 100644 --- a/scripts/modules/commands.js +++ b/scripts/modules/commands.js @@ -2353,10 +2353,14 @@ ${result.result} .option('--tag ', 'Specify tag context for task operations') .action(async (taskId, options) => { // Initialize TaskMaster - const taskMaster = initTaskMaster({ - tasksPath: options.file || true, - complexityReportPath: options.report || false - }); + const initOptions = { + tasksPath: options.file || true + }; + // Only pass complexityReportPath if user provided a custom path + if (options.report && options.report !== COMPLEXITY_REPORT_FILE) { + initOptions.complexityReportPath = options.report; + } + const taskMaster = initTaskMaster(initOptions); const idArg = taskId || options.id; const statusFilter = options.status;