Update to latest typescript version (#274)
This commit is contained in:
1 parent
8e97d83c48
commit
aa0d532c6f
2 files changed
+5
-17
No files matched your search
@@ -748,9 +748,7 @@ describe('@actions/exec', () => {
|
|||||||
const exitCode = await exec.exec(`"${cmdPath}"`, args, options)
|
const exitCode = await exec.exec(`"${cmdPath}"`, args, options)
|
||||||
expect(exitCode).toBe(0)
|
expect(exitCode).toBe(0)
|
||||||
expect(outStream.getContents().split(os.EOL)[0]).toBe(
|
expect(outStream.getContents().split(os.EOL)[0]).toBe(
|
||||||
`[command]${
|
`[command]${process.env.ComSpec} /D /S /C ""${cmdPath}" "my arg 1" "my arg 2""`
|
||||||
process.env.ComSpec
|
|
||||||
} /D /S /C ""${cmdPath}" "my arg 1" "my arg 2""`
|
|
||||||
)
|
)
|
||||||
expect(output.trim()).toBe(
|
expect(output.trim()).toBe(
|
||||||
'args[0]: "<quote>my arg 1<quote>"\r\n' +
|
'args[0]: "<quote>my arg 1<quote>"\r\n' +
|
||||||
@@ -780,9 +778,7 @@ describe('@actions/exec', () => {
|
|||||||
const exitCode = await exec.exec(`${cmd}`, args, options)
|
const exitCode = await exec.exec(`${cmd}`, args, options)
|
||||||
expect(exitCode).toBe(0)
|
expect(exitCode).toBe(0)
|
||||||
expect(outStream.getContents().split(os.EOL)[0]).toBe(
|
expect(outStream.getContents().split(os.EOL)[0]).toBe(
|
||||||
`[command]${
|
`[command]${process.env.ComSpec} /D /S /C "${cmdPath} "my arg 1" "my arg 2""`
|
||||||
process.env.ComSpec
|
|
||||||
} /D /S /C "${cmdPath} "my arg 1" "my arg 2""`
|
|
||||||
)
|
)
|
||||||
expect(output.trim()).toBe(
|
expect(output.trim()).toBe(
|
||||||
'args[0]: "<quote>my arg 1<quote>"\r\n' +
|
'args[0]: "<quote>my arg 1<quote>"\r\n' +
|
||||||
|
|||||||
+3
-11
@@ -639,23 +639,15 @@ class ExecState extends events.EventEmitter {
|
|||||||
if (this.processExited) {
|
if (this.processExited) {
|
||||||
if (this.processError) {
|
if (this.processError) {
|
||||||
error = new Error(
|
error = new Error(
|
||||||
`There was an error when attempting to execute the process '${
|
`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`
|
||||||
this.toolPath
|
|
||||||
}'. This may indicate the process failed to start. Error: ${
|
|
||||||
this.processError
|
|
||||||
}`
|
|
||||||
)
|
)
|
||||||
} else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) {
|
} else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) {
|
||||||
error = new Error(
|
error = new Error(
|
||||||
`The process '${this.toolPath}' failed with exit code ${
|
`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`
|
||||||
this.processExitCode
|
|
||||||
}`
|
|
||||||
)
|
)
|
||||||
} else if (this.processStderr && this.options.failOnStdErr) {
|
} else if (this.processStderr && this.options.failOnStdErr) {
|
||||||
error = new Error(
|
error = new Error(
|
||||||
`The process '${
|
`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`
|
||||||
this.toolPath
|
|
||||||
}' failed because one or more lines were written to the STDERR stream`
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user