feat(spawn): support inherited stdio

This commit is contained in:
2026-05-10 14:32:07 +00:00
parent a0010e7f0f
commit 0ff3596bd8
4 changed files with 50 additions and 8 deletions
+14
View File
@@ -80,6 +80,20 @@ tap.test('execSpawn should properly escape arguments', async () => {
expect(result.stdout).toContain('$HOME && ls');
});
tap.test('execSpawn should support inherited stdio for interactive CLIs', async () => {
const testSmartshell = new smartshell.Smartshell({
executor: 'bash',
sourceFilePaths: [],
});
const result = await testSmartshell.execSpawn('node', ['-e', 'console.log("inherited stdio works")'], {
stdio: 'inherit',
});
expect(result.exitCode).toEqual(0);
expect(result.stdout).toEqual('');
expect(result.stderr).toEqual('');
});
tap.test('execSpawn streaming should work', async () => {
const testSmartshell = new smartshell.Smartshell({
executor: 'bash',