This commit is contained in:
lif 2026-03-21 19:56:04 +08:00 committed by GitHub
commit 17b5926198
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@
* This file ensures proper execution when run via npx from GitHub or npm registry
*/
const { execSync } = require('node:child_process');
const { execFileSync } = require('node:child_process');
const path = require('node:path');
const fs = require('node:fs');
@ -25,7 +25,7 @@ if (isNpxExecution) {
try {
// Execute CLI from user's working directory (process.cwd()), not npm cache
execSync(`node "${bmadCliPath}" ${args.join(' ')}`, {
execFileSync('node', [bmadCliPath, ...args], {
stdio: 'inherit',
cwd: process.cwd(), // This preserves the user's working directory
});