Compare commits

...

4 Commits

Author SHA1 Message Date
lif aa1f80ea37
Merge c9e4db1445 into ba2a5cc6a0 2026-03-22 10:12:45 -06:00
Alex Verkhovsky c9e4db1445
Merge branch 'main' into fix/issue-2066-user-name-spaces 2026-03-21 19:23:50 -06:00
Alex Verkhovsky 1a78916e3c
Merge branch 'main' into fix/issue-2066-user-name-spaces 2026-03-21 15:39:19 -06:00
majiayu000 4d153c35da
fix: use execFileSync to preserve spaces in CLI arguments
Replace execSync with execFileSync in npx wrapper so that
argument values containing spaces (e.g. --user-name "CI Bot")
are passed as discrete array elements instead of being split
by the shell.

Fixes #2066

Signed-off-by: majiayu000 <1835304752@qq.com>
2026-03-21 19:53:58 +08:00
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
});