1
0
Fork 0

Change output message

pull/1562/head
Dusan Trickovic 2023-09-19 12:36:22 +02:00
parent 31cd25530e
commit 45c2409453
2 changed files with 3 additions and 5 deletions

View File

@ -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.')
}
})
})

View File

@ -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)