fix formatting

This commit is contained in:
Joe Danziger
2025-05-09 12:21:51 -04:00
parent 476048b184
commit d48a3d3edc
7 changed files with 129 additions and 91 deletions

View File

@@ -80,9 +80,9 @@ export async function initializeProjectDirect(args, log, context = {}) {
// Handle rules option just like CLI
if (Array.isArray(args.rules) && args.rules.length > 0) {
options.rules = args.rules;
log.info(`Including brand rules: ${args.rules.join(", ")}`);
log.info(`Including brand rules: ${args.rules.join(', ')}`);
} else {
options.rules = ["cursor"];
options.rules = ['cursor'];
log.info(`No rules specified, defaulting to: cursor`);
}

View File

@@ -24,7 +24,12 @@ export async function rulesDirect(args, log, context = {}) {
enableSilentMode();
try {
const { action, rules, projectRoot, yes } = args;
if (!action || !Array.isArray(rules) || rules.length === 0 || !projectRoot) {
if (
!action ||
!Array.isArray(rules) ||
rules.length === 0 ||
!projectRoot
) {
return {
success: false,
error: {
@@ -35,7 +40,8 @@ export async function rulesDirect(args, log, context = {}) {
}
const rulesList = rules.join(',');
const yesFlag = yes !== false ? '--yes' : '';
const cmd = `npx task-master rules ${action} ${rulesList} ${yesFlag}`.trim();
const cmd =
`npx task-master rules ${action} ${rulesList} ${yesFlag}`.trim();
log.info(`[rulesDirect] Running: ${cmd} in ${projectRoot}`);
const output = execSync(cmd, { cwd: projectRoot, encoding: 'utf8' });
log.info(`[rulesDirect] Output: ${output}`);