Skip to content

Commit

Permalink
save register cache on tick instead of sigint - fixes #1062
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmck committed Mar 23, 2015
1 parent bc6d01d commit 5c41a33
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/babel/api/register/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,7 @@ export function load() {
if (process.env.BABEL_DISABLE_CACHE) return;

process.on("exit", save);

var sigint = function () {
process.removeListener("SIGINT", sigint);
save();
process.kill(process.pid, "SIGINT");
};

process.on("SIGINT", sigint);
process.nextTick(save);

if (!fs.existsSync(FILENAME)) return;

Expand Down

0 comments on commit 5c41a33

Please sign in to comment.