fix: projectRoot duplicate .taskmaster directory (#655)
This commit is contained in:
@@ -11,7 +11,7 @@ import {
|
||||
} from './utils.js';
|
||||
import { complexityReportDirect } from '../core/task-master-core.js';
|
||||
import { COMPLEXITY_REPORT_FILE } from '../../../src/constants/paths.js';
|
||||
import path from 'path';
|
||||
import { findComplexityReportPath } from '../core/utils/path-utils.js';
|
||||
|
||||
/**
|
||||
* Register the complexityReport tool with the MCP server
|
||||
@@ -38,10 +38,18 @@ export function registerComplexityReportTool(server) {
|
||||
`Getting complexity report with args: ${JSON.stringify(args)}`
|
||||
);
|
||||
|
||||
// Use args.projectRoot directly (guaranteed by withNormalizedProjectRoot)
|
||||
const reportPath = args.file
|
||||
? path.resolve(args.projectRoot, args.file)
|
||||
: path.resolve(args.projectRoot, COMPLEXITY_REPORT_FILE);
|
||||
const pathArgs = {
|
||||
projectRoot: args.projectRoot,
|
||||
complexityReport: args.file
|
||||
};
|
||||
|
||||
const reportPath = findComplexityReportPath(pathArgs, log);
|
||||
|
||||
if (!reportPath) {
|
||||
return createErrorResponse(
|
||||
'No complexity report found. Run task-master analyze-complexity first.'
|
||||
);
|
||||
}
|
||||
|
||||
const result = await complexityReportDirect(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user