diff --git a/packages/helpers/__tests__/exec-command-wrapper.test.ts b/packages/helpers/__tests__/exec-command-wrapper.test.ts index 04401a3f..ffbf208d 100644 --- a/packages/helpers/__tests__/exec-command-wrapper.test.ts +++ b/packages/helpers/__tests__/exec-command-wrapper.test.ts @@ -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.') } }) }) diff --git a/packages/helpers/src/exec-command-wrapper.ts b/packages/helpers/src/exec-command-wrapper.ts index 317bf596..b0dd3ccf 100644 --- a/packages/helpers/src/exec-command-wrapper.ts +++ b/packages/helpers/src/exec-command-wrapper.ts @@ -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)