Skip to content

Commit

Permalink
Catch Hosting Cache Write Errors (#925)
Browse files Browse the repository at this point in the history
* add catch around writing cache to avoid error messages

* add stack to debug log
  • Loading branch information
bkendall committed Sep 27, 2018
1 parent f8e504d commit 0a8d75b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/deploy/hosting/hashcache.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ exports.dump = function(cwd, name, data) {
count++;
st += path + "," + data[path].mtime + "," + data[path].hash + "\n";
}
fs.outputFileSync(cachePath(cwd, name), st, { encoding: "utf8" });
logger.debug("[hosting] hash cache [" + name + "] stored for", count, "files");
try {
fs.outputFileSync(cachePath(cwd, name), st, { encoding: "utf8" });
logger.debug("[hosting] hash cache [" + name + "] stored for", count, "files");
} catch (e) {
logger.debug("[hosting] unable to store hash cache [" + name + "]", e.stack);
}
};

0 comments on commit 0a8d75b

Please sign in to comment.