fix: remove shell:true default to fix command output
- Removed shell:true default that caused double shell wrapping - This was causing echo and other commands to return empty output - Now matches OpenClaw exec behavior which never uses shell:true
This commit is contained in:
@@ -201,7 +201,8 @@ export async function pcexec(command: string, options: PcExecOptions = {}): Prom
|
||||
const spawnOptions: SpawnOptions = {
|
||||
cwd: options.cwd,
|
||||
env,
|
||||
shell: options.shell ?? true,
|
||||
// Don't use shell by default - we're already using bash -c explicitly
|
||||
shell: options.shell,
|
||||
windowsHide: options.windowsHide,
|
||||
uid: options.uid,
|
||||
gid: options.gid,
|
||||
@@ -327,7 +328,8 @@ export function pcexecSync(command: string, options: PcExecOptions = {}): PcExec
|
||||
const execOptions: any = {
|
||||
cwd: options.cwd,
|
||||
env,
|
||||
shell: options.shell ?? true,
|
||||
// Don't use shell by default
|
||||
shell: options.shell,
|
||||
encoding: 'utf8',
|
||||
windowsHide: options.windowsHide,
|
||||
uid: options.uid,
|
||||
|
||||
Reference in New Issue
Block a user