From aa0d532c6f537dab808887f4e87a6d20221625e2 Mon Sep 17 00:00:00 2001 From: Josh Gross Date: Fri, 27 Dec 2019 19:42:30 -0500 Subject: [PATCH] Update to latest typescript version (#274) --- __tests__/exec.test.ts | 8 ++------ src/toolrunner.ts | 14 +++----------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/__tests__/exec.test.ts b/__tests__/exec.test.ts index 4cf322f..387c83f 100644 --- a/__tests__/exec.test.ts +++ b/__tests__/exec.test.ts @@ -748,9 +748,7 @@ describe('@actions/exec', () => { const exitCode = await exec.exec(`"${cmdPath}"`, args, options) expect(exitCode).toBe(0) expect(outStream.getContents().split(os.EOL)[0]).toBe( - `[command]${ - process.env.ComSpec - } /D /S /C ""${cmdPath}" "my arg 1" "my arg 2""` + `[command]${process.env.ComSpec} /D /S /C ""${cmdPath}" "my arg 1" "my arg 2""` ) expect(output.trim()).toBe( 'args[0]: "my arg 1"\r\n' + @@ -780,9 +778,7 @@ describe('@actions/exec', () => { const exitCode = await exec.exec(`${cmd}`, args, options) expect(exitCode).toBe(0) expect(outStream.getContents().split(os.EOL)[0]).toBe( - `[command]${ - process.env.ComSpec - } /D /S /C "${cmdPath} "my arg 1" "my arg 2""` + `[command]${process.env.ComSpec} /D /S /C "${cmdPath} "my arg 1" "my arg 2""` ) expect(output.trim()).toBe( 'args[0]: "my arg 1"\r\n' + diff --git a/src/toolrunner.ts b/src/toolrunner.ts index 2182fed..c578b25 100644 --- a/src/toolrunner.ts +++ b/src/toolrunner.ts @@ -639,23 +639,15 @@ class ExecState extends events.EventEmitter { if (this.processExited) { if (this.processError) { error = new Error( - `There was an error when attempting to execute the process '${ - this.toolPath - }'. This may indicate the process failed to start. Error: ${ - this.processError - }` + `There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}` ) } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { error = new Error( - `The process '${this.toolPath}' failed with exit code ${ - this.processExitCode - }` + `The process '${this.toolPath}' failed with exit code ${this.processExitCode}` ) } else if (this.processStderr && this.options.failOnStdErr) { error = new Error( - `The process '${ - this.toolPath - }' failed because one or more lines were written to the STDERR stream` + `The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream` ) } }