Skip to content
This repository has been archived by the owner on Jan 14, 2022. It is now read-only.

Commit

Permalink
Restore console state before exiting
Browse files Browse the repository at this point in the history
  • Loading branch information
f2bo committed Feb 3, 2016
1 parent a8598ab commit 3fc1322
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ function ProgressIndicator (message, options, updateFrequency, stream) {
cursor = ansi(stream);
}

process.on('beforeExit', function () {
self.reset();
});

self.update = function update () {
if (cursor) {
// savePosition & restorePosition do not seem to work in Mac OS X
Expand Down

0 comments on commit 3fc1322

Please sign in to comment.