Skip to content

Commit

Permalink
Added 'vorpal_exit' event
Browse files Browse the repository at this point in the history
Added vorpal_exit event on ctrl+c for exiting hook
  • Loading branch information
MichelYpma authored Nov 2, 2016
1 parent 0a6fea5 commit c44e36a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class UI extends EventEmitter {
this._sigintCount = 0;
this._sigint = () => {
if (this._sigintCount > 1) {
this.parent.emit('vorpal_exit');
process.exit(0);
} else {
const text = this.input();
Expand Down

0 comments on commit c44e36a

Please sign in to comment.