Skip to content

Commit

Permalink
fix: default ExitError to exit error code 1 (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
RasPhilCo committed Jan 27, 2021
1 parent 698125d commit 2005c5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/errors/errors/exit.ts
Expand Up @@ -6,7 +6,7 @@ export class ExitError extends CLIError implements OclifError {

code = 'EEXIT'

constructor(exitCode = 0) {
constructor(exitCode = 1) {
super(`EEXIT: ${exitCode}`, {exit: exitCode})
}

Expand Down
2 changes: 1 addition & 1 deletion test/errors/handle.test.ts
Expand Up @@ -66,7 +66,7 @@ describe('handle', () => {
.stderr()
.finally(() => delete process.exitCode)
.it('hides an exit error', ctx => {
handle(new ExitError())
handle(new ExitError(0))
expect(ctx.stdout).to.equal('')
expect(ctx.stderr).to.equal('')
expect(process.exitCode).to.equal(0)
Expand Down

0 comments on commit 2005c5f

Please sign in to comment.