Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit 436a699

Browse files
authored
Setting exit code to 1 on error (#1156)
1 parent ea3dc6f commit 436a699

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

packages/command/src/command.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export abstract class Command extends Base {
5252
}
5353

5454
// return exit code
55+
process.exitCode = 1
5556
this.exit(1)
5657
}
5758

packages/command/test/command.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ describe('command', () => {
2121
})
2222
.catch(err => {
2323
expect(err.message).to.include('EEXIT: 1')
24+
expect(process.exitCode).to.equal(1)
2425
})
2526
.finally(output => expect(output.stderr).to.equal('Unknown error during execution. Please file an issue on https://github.com/microsoft/botframework-cli/issues\nfailure\n'))
2627
.it('Errors out')

0 commit comments

Comments
 (0)