File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
src/integrations/terminal Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -38,13 +38,14 @@ export class ExecaTerminalProcess extends BaseTerminalProcess {
3838 shell : true ,
3939 cwd : this . terminal . getCurrentWorkingDirectory ( ) ,
4040 cancelSignal : this . controller . signal ,
41+ all : true ,
4142 } ) `${ command } `
4243
43- this . terminal . setActiveStream ( subprocess , subprocess . pid )
44- this . emit ( "line" , "" )
44+ const stream = subprocess . iterable ( { from : "all" , preserveNewlines : true } )
45+ this . terminal . setActiveStream ( stream , subprocess . pid )
4546
46- for await ( const line of subprocess ) {
47- this . fullOutput += ` ${ line } \n`
47+ for await ( const line of stream ) {
48+ this . fullOutput += line
4849
4950 const now = Date . now ( )
5051
@@ -62,6 +63,9 @@ export class ExecaTerminalProcess extends BaseTerminalProcess {
6263 console . error ( `[ExecaTerminalProcess] shell execution error: ${ error . message } ` )
6364 this . emit ( "shell_execution_complete" , { exitCode : error . exitCode ?? 0 , signalName : error . signal } )
6465 } else {
66+ console . error (
67+ `[ExecaTerminalProcess] shell execution error: ${ error instanceof Error ? error . message : String ( error ) } ` ,
68+ )
6569 this . emit ( "shell_execution_complete" , { exitCode : 1 } )
6670 }
6771 }
You can’t perform that action at this time.
0 commit comments