Skip to content

Commit

Permalink
Added 'vorpal_exit' event
Browse files Browse the repository at this point in the history
Added 'vorpal_exit' event for exiting hook
  • Loading branch information
MichelYpma authored Nov 2, 2016
1 parent 0a6fea5 commit b2f22d0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/vorpal.js
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,7 @@ vorpal.getSessionById = function (id) {

vorpal.exit = function (options) {
var ssn = this.getSessionById(options.sessionId);
this.emit('vorpal_exit');
if (ssn.isLocal()) {
process.exit(0);
} else {
Expand Down

0 comments on commit b2f22d0

Please sign in to comment.