From 04125bc85268dbd94415c365a7c93f9b5f856deb Mon Sep 17 00:00:00 2001 From: Joe Danziger Date: Wed, 4 Jun 2025 16:04:52 -0400 Subject: [PATCH] fix MCP path to assets --- src/utils/rule-transformer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/rule-transformer.js b/src/utils/rule-transformer.js index fb2d1804..fa2d5569 100644 --- a/src/utils/rule-transformer.js +++ b/src/utils/rule-transformer.js @@ -7,6 +7,7 @@ */ import fs from 'fs'; import path from 'path'; +import { fileURLToPath } from 'url'; import { log } from '../../scripts/modules/utils.js'; // Import the shared MCP configuration helper @@ -198,7 +199,9 @@ export function convertRuleToProfileRule(sourcePath, targetPath, profile) { * Convert all Cursor rules to profile rules for a specific profile */ export function convertAllRulesToProfileRules(projectDir, profile) { - const sourceDir = path.join(process.cwd(), 'assets', 'rules'); + const __filename = fileURLToPath(import.meta.url); + const __dirname = path.dirname(__filename); + const sourceDir = path.join(__dirname, '..', '..', 'assets', 'rules'); const targetDir = path.join(projectDir, profile.rulesDir); // Ensure target directory exists