refactor(bootstrap): set child process cwd to workspace root in CLI spawn
Update CLI command spawning to explicitly set the working directory to the workspace root. This ensures subprocesses execute in a consistent environment, improving reliability in monorepo setups.
This commit is contained in:
parent
ee979205b3
commit
d4d8f0a590
1 changed files with 1 additions and 0 deletions
|
|
@ -97,6 +97,7 @@ function forwardChildStream(stream, target) {
|
||||||
function spawnMainCommand(command, env) {
|
function spawnMainCommand(command, env) {
|
||||||
const [cmd, ...args] = command;
|
const [cmd, ...args] = command;
|
||||||
const child = spawn(cmd, args, {
|
const child = spawn(cmd, args, {
|
||||||
|
cwd: workspaceRoot,
|
||||||
env,
|
env,
|
||||||
stdio: 'inherit',
|
stdio: 'inherit',
|
||||||
shell: process.platform === 'win32',
|
shell: process.platform === 'win32',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue