mirror of https://github.com/actions/toolkit
Change output message
parent
31cd25530e
commit
45c2409453
|
@ -77,7 +77,7 @@ describe('Command', () => {
|
|||
const result = await command.execute()
|
||||
expect(result.stdout).toBe('')
|
||||
} catch (err) {
|
||||
expect(err.message).toContain('Command produced empty output.')
|
||||
expect(err.message).toContain('The command produced an empty output.')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -35,7 +35,7 @@ export default class CommandHelper {
|
|||
}
|
||||
|
||||
if (this.config.throwOnEmptyOutput && output.stdout.trim() === '') {
|
||||
this.onError('Command produced empty output.').throw()
|
||||
this.onError(`The command produced an empty output.`).throw()
|
||||
}
|
||||
|
||||
if (this.config.failOnError && output.stderr) {
|
||||
|
@ -43,7 +43,7 @@ export default class CommandHelper {
|
|||
}
|
||||
|
||||
if (this.config.failOnEmptyOutput && output.stdout.trim() === '') {
|
||||
this.onError('Command produced empty output.').fail()
|
||||
this.onError(`The command produced an empty output.`).fail()
|
||||
}
|
||||
|
||||
return output
|
||||
|
@ -56,8 +56,6 @@ export default class CommandHelper {
|
|||
throw: () => never
|
||||
fail: () => void
|
||||
} {
|
||||
core.error(`Error occurred: ${errorMessage}`)
|
||||
|
||||
return {
|
||||
throw: () => {
|
||||
throw new Error(errorMessage)
|
||||
|
|
Loading…
Reference in New Issue