From 0f9bc3378d63fd0d3e59f79ca7f5a555ffaaf3cf Mon Sep 17 00:00:00 2001 From: Eyal Toledano Date: Thu, 27 Mar 2025 13:32:56 -0400 Subject: [PATCH] git commit -m "fix: improve CLI error handling and standardize option flags This commit fixes several issues with command line interface error handling: 1. Fix inconsistent behavior between --no-generate and --skip-generate: - Standardized on --skip-generate across all commands - Updated bin/task-master.js to use --skip-generate instead of --no-generate - Modified add-subtask and remove-subtask commands to use --skip-generate 2. Enhance error handling for unknown options: - Removed .allowUnknownOption() from commands to properly detect unknown options - Added global error handler in bin/task-master.js for unknown commands/options - Added command-specific error handlers with helpful error messages 3. Improve user experience with better help messages: - Added helper functions to display formatted command help on errors - Created command-specific help displays for add-subtask and remove-subtask - Show available options when encountering unknown options 4. Update MCP server configuration: - Modified .cursor/mcp.json to use node ./mcp-server/server.js directly - Removed npx -y usage for more reliable execution 5. Other minor improvements: - Adjusted column width for task ID display in UI - Updated version number in package-lock.json to 0.9.30 This resolves issues where users would see confusing error messages like 'error: unknown option --generate' when using an incorrect flag." --- .cursor/mcp.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.cursor/mcp.json b/.cursor/mcp.json index e416c639..6b838029 100644 --- a/.cursor/mcp.json +++ b/.cursor/mcp.json @@ -1,10 +1,9 @@ { "mcpServers": { "taskmaster-ai": { - "command": "npx", + "command": "node", "args": [ - "-y", - "bin/task-master-mcp-server.js" + "./mcp-server/server.js" ] } }