This commit is contained in:
Bethany
2023-09-06 08:11:26 -07:00
parent 400d7a5357
commit e8f2199348
15 changed files with 65 additions and 100 deletions

View File

@@ -357,7 +357,7 @@ describe('@actions/exec', () => {
expect(exitCode).toBe(0)
})
it('Handles child process holding streams open', async function() {
it('Handles child process holding streams open', async function () {
const semaphorePath = path.join(
getTestTemp(),
'child-process-semaphore.txt'
@@ -403,7 +403,7 @@ describe('@actions/exec', () => {
fs.unlinkSync(semaphorePath)
}, 10000) // this was timing out on some slower hosted macOS runs at default 5s
it('Handles child process holding streams open and non-zero exit code', async function() {
it('Handles child process holding streams open and non-zero exit code', async function () {
const semaphorePath = path.join(
getTestTemp(),
'child-process-semaphore.txt'
@@ -457,7 +457,7 @@ describe('@actions/exec', () => {
fs.unlinkSync(semaphorePath)
}, 10000) // this was timing out on some slower hosted macOS runs at default 5s
it('Handles child process holding streams open and stderr', async function() {
it('Handles child process holding streams open and stderr', async function () {
const semaphorePath = path.join(
getTestTemp(),
'child-process-semaphore.txt'

View File

@@ -267,10 +267,7 @@ export class ToolRunner extends events.EventEmitter {
}
reverse += '"'
return reverse
.split('')
.reverse()
.join('')
return reverse.split('').reverse().join('')
}
private _uvQuoteCmdArg(arg: string): string {
@@ -350,10 +347,7 @@ export class ToolRunner extends events.EventEmitter {
}
reverse += '"'
return reverse
.split('')
.reverse()
.join('')
return reverse.split('').reverse().join('')
}
private _cloneExecOptions(options?: im.ExecOptions): im.ExecOptions {
@@ -691,8 +685,9 @@ class ExecState extends events.EventEmitter {
}
if (!state.processClosed && state.processExited) {
const message = `The STDIO streams did not close within ${state.delay /
1000} seconds of the exit event from process '${
const message = `The STDIO streams did not close within ${
state.delay / 1000
} seconds of the exit event from process '${
state.toolPath
}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`
state._debug(message)