@@ -9,7 +9,7 @@ import {GitData} from "./git-data.js";
99import assert , { AssertionError } from "node:assert" ;
1010import { Mutex } from "./mutex.js" ;
1111import { Argv } from "./argv.js" ;
12- import execa from "execa" ;
12+ import { execa } from "execa" ;
1313import { CICDVariable } from "./variables-from-files.js" ;
1414import { GitlabRunnerCPUsPresetValue , GitlabRunnerMemoryPresetValue , GitlabRunnerPresetValues } from "./gitlab-preset.js" ;
1515import { handler } from "./handler.js" ;
@@ -932,10 +932,12 @@ If you know what you're doing and would like to suppress this warning, use one o
932932 shell : "bash" ,
933933 stdio : [ "inherit" , "inherit" , "inherit" ] ,
934934 env : { ...expanded , ...process . env } ,
935+ reject : false ,
935936 } ) ;
937+ const interactiveChildProcess = interactiveCp . nodeChildProcess ;
936938 return new Promise < number > ( ( resolve , reject ) => {
937- void interactiveCp . on ( "exit" , ( code ) => resolve ( code ?? 0 ) ) ;
938- void interactiveCp . on ( "error" , ( err ) => reject ( err ) ) ;
939+ interactiveChildProcess . on ( "exit" , ( code ) => resolve ( code ?? 0 ) ) ;
940+ interactiveChildProcess . on ( "error" , ( err ) => reject ( err ) ) ;
939941 } ) ;
940942 }
941943
@@ -1143,7 +1145,9 @@ If you know what you're doing and would like to suppress this warning, use one o
11431145 cwd,
11441146 shell : "bash" ,
11451147 env : imageName ? process . env : expanded ,
1148+ reject : false ,
11461149 } ) ;
1150+ const childProcess = cp . nodeChildProcess ;
11471151
11481152 // eslint-disable-next-line no-control-regex
11491153 const sectionRegex = / \x1b \[ 0 K s e c t i o n _ ( s t a r t | e n d ) : ( \d + ) : ( [ ^ \s [ ] + ) (?: \[ [ ^ \] ] * \] ) ? \r \x1b \[ 0 K / ;
@@ -1187,11 +1191,11 @@ If you know what you're doing and would like to suppress this warning, use one o
11871191 }
11881192 // Wait for "close" rather than "exit" so all stdout/stderr data events
11891193 // have flushed to the output log file before we resolve.
1190- void cp . on ( "close" , ( code ) => {
1194+ childProcess . on ( "close" , ( code ) => {
11911195 clearTimeout ( this . _longRunningSilentTimeout ) ;
11921196 return resolve ( code ?? 0 ) ; } ,
11931197 ) ;
1194- void cp . on ( "error" , ( err ) => {
1198+ childProcess . on ( "error" , ( err ) => {
11951199 clearTimeout ( this . _longRunningSilentTimeout ) ;
11961200 return reject ( err ) ;
11971201 } ) ;
0 commit comments