feat(spawn): support inherited stdio
This commit is contained in:
@@ -197,6 +197,16 @@ const result = await shell.execSpawn('git', ['status', '--short'], {
|
||||
});
|
||||
```
|
||||
|
||||
For trusted interactive CLIs that need the real terminal while still avoiding shell parsing, pass `stdio: 'inherit'`:
|
||||
|
||||
```typescript
|
||||
await shell.execSpawn('opencode', ['run', '--dir', process.cwd(), prompt], {
|
||||
stdio: 'inherit',
|
||||
});
|
||||
```
|
||||
|
||||
Inherited stdio returns an `IExecResult` with the exit code, but stdout and stderr are not captured because the child process writes directly to the terminal.
|
||||
|
||||
### Why Spawn Matters
|
||||
|
||||
```typescript
|
||||
|
||||
Reference in New Issue
Block a user