Skip to content

Commit 45c2409

Browse files
Change output message
1 parent 31cd255 commit 45c2409

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

packages/helpers/__tests__/exec-command-wrapper.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ describe('Command', () => {
7777
const result = await command.execute()
7878
expect(result.stdout).toBe('')
7979
} catch (err) {
80-
expect(err.message).toContain('Command produced empty output.')
80+
expect(err.message).toContain('The command produced an empty output.')
8181
}
8282
})
8383
})

packages/helpers/src/exec-command-wrapper.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ export default class CommandHelper {
3535
}
3636

3737
if (this.config.throwOnEmptyOutput && output.stdout.trim() === '') {
38-
this.onError('Command produced empty output.').throw()
38+
this.onError(`The command produced an empty output.`).throw()
3939
}
4040

4141
if (this.config.failOnError && output.stderr) {
4242
this.onError(output.stderr).fail()
4343
}
4444

4545
if (this.config.failOnEmptyOutput && output.stdout.trim() === '') {
46-
this.onError('Command produced empty output.').fail()
46+
this.onError(`The command produced an empty output.`).fail()
4747
}
4848

4949
return output
@@ -56,8 +56,6 @@ export default class CommandHelper {
5656
throw: () => never
5757
fail: () => void
5858
} {
59-
core.error(`Error occurred: ${errorMessage}`)
60-
6159
return {
6260
throw: () => {
6361
throw new Error(errorMessage)

0 commit comments

Comments
 (0)