Just warn when a file doesn't exist

This commit is contained in:
Joe Reeve
2018-12-13 11:35:14 +01:00
parent a8e6168a25
commit f0962b717a

View File

@ -63,7 +63,13 @@ readDirPromise('./')
async function processMDFile(filePath = '/', templateHTML = null) {
const mdSrc = await readFilePromise(filePath);
let mdSrc;
try {
mdSrc = await readFilePromise(filePath);
} catch (err) {
console.warn(`Failed to read file [${filePath}], does it exist?`);
return '';
}
const generatedHTML = converter.makeHtml(mdSrc);
let nexHTML = generatedHTML;
if (templateHTML) {