Skip to content

Commit

Permalink
Merge pull request #74 from saadtazi/bug/73-ctl-c-not-exiting
Browse files Browse the repository at this point in the history
properly exit on ctl-c
  • Loading branch information
saadtazi committed Dec 12, 2016
2 parents 9971ffa + b0fc41a commit eb4862d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/firefox_profile.js
Expand Up @@ -136,13 +136,14 @@ function FirefoxProfile(options) {

// delete on process.exit()...
var self = this;
this.onExit = function() {
this.onExit = function(evt) {
if (self._deleteOnExit) {
self._cleanOnExit();
}
process.exit(evt === 'SIGINT' ? 130 : 0);
};
['exit', 'SIGINT'].forEach(function(event) {
process.addListener(event, self.onExit);
process.addListener(event, self.onExit.bind(self, event));
});
}

Expand All @@ -154,9 +155,7 @@ function deleteParallel(files, cb) {
});
}


FirefoxProfile.prototype._copy = function(profileDirectory, cb) {
var self = this;
fs.copy(profileDirectory, this.profileDir, {
clobber: true,
filter: isNotLockFile
Expand Down

0 comments on commit eb4862d

Please sign in to comment.