Skip to content
Permalink
Browse files

Adds error handling to write metadata script

  • Loading branch information
davidmerfield committed Dec 14, 2019
1 parent 2d992ff commit e581743ce6d3c5b60bbc433669e71763b0b887aa
Showing with 6 additions and 0 deletions.
  1. +6 −0 scripts/blog/write-data-metadata.js
@@ -21,7 +21,13 @@ get(process.argv[2], function(err, user, blog) {
return next();
}
console.log(entry.path, 'reading');
try {
contents = fs.readFileSync(localPath(blog.id, entry.path), 'utf8');
} catch (e) {
console.log(e);
return next();
}

hasMetadata = Object.keys(entry.metadata).length > 0;
dateMetadata = 'Date: ' + moment
.utc(entry.dateStamp)

0 comments on commit e581743

Please sign in to comment.
You can’t perform that action at this time.