Skip to content

Commit 097eb99

Browse files
committed
fix: update sourceRulesBasePath initialization for npx sandbox detection
1 parent e6409fe commit 097eb99

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cli/utils/download-files.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import { validateDirname } from './validate-dirname.mjs';
1010
const detection = detectNpxSandbox();
1111
const __dirname = dirname(fileURLToPath(import.meta.url));
1212

13-
/** @type {string} */
14-
let sourceRulesBasePath;
13+
/** @type {string|undefined} */
14+
let sourceRulesBasePath = '';
1515

16-
if (detection.isNpxSandbox) {
16+
if (detection.isNpxSandbox || !sourceRulesBasePath) {
1717
const packageRoot = findPackageRoot(__dirname, '@usrrname/cursorrules');
1818
sourceRulesBasePath = resolve(packageRoot, '.cursor', 'rules');
1919
}

0 commit comments

Comments
 (0)