@@ -89,9 +89,9 @@ namespace Harness {
89
89
Baseline . runBaseline ( `${ cls . kind ( ) } /${ directoryName } .log` , cls . report ( cp . spawnSync ( `node` , args , { cwd, timeout, shell : true } ) , cwd ) ) ;
90
90
91
91
function exec ( command : string , args : string [ ] , options : { cwd : string , timeout ?: number } ) : void {
92
- const res = cp . spawnSync ( command , args , { timeout , shell : true , stdio, ...options } ) ;
92
+ const res = cp . spawnSync ( isWorker ? ` ${ command } 2>&1` : command , args , { shell : true , stdio, ...options } ) ;
93
93
if ( res . status !== 0 ) {
94
- throw new Error ( `${ command } ${ args . join ( " " ) } for ${ directoryName } failed: ${ res . stderr && res . stderr . toString ( ) } ` ) ;
94
+ throw new Error ( `${ command } ${ args . join ( " " ) } for ${ directoryName } failed: ${ res . stdout && res . stdout . toString ( ) } ` ) ;
95
95
}
96
96
}
97
97
} ) ;
@@ -146,12 +146,12 @@ ${stripAbsoluteImportPaths(result.stderr.toString().replace(/\r\n/g, "\n"))}`;
146
146
}
147
147
148
148
private timeout = 1_200_000 ; // 20 minutes;
149
- private exec ( command : string , args : string [ ] , options : { cwd : string , timeout ?: number } ) : void {
149
+ private exec ( command : string , args : string [ ] , options : { cwd : string } ) : void {
150
150
const cp : typeof import ( "child_process" ) = require ( "child_process" ) ;
151
151
const stdio = isWorker ? "pipe" : "inherit" ;
152
- const res = cp . spawnSync ( command , args , { timeout : this . timeout , shell : true , stdio, ...options } ) ;
152
+ const res = cp . spawnSync ( isWorker ? ` ${ command } 2>&1` : command , args , { timeout : this . timeout , shell : true , stdio, ...options } ) ;
153
153
if ( res . status !== 0 ) {
154
- throw new Error ( `${ command } ${ args . join ( " " ) } for ${ options . cwd } failed: ${ res . stderr && res . stderr . toString ( ) } ` ) ;
154
+ throw new Error ( `${ command } ${ args . join ( " " ) } for ${ options . cwd } failed: ${ res . stdout && res . stdout . toString ( ) } ` ) ;
155
155
}
156
156
}
157
157
report ( result : ExecResult ) {
0 commit comments