Ammending a small bug that came up in the curvyandtrans codebase

This commit is contained in:
Jocelyn Badgley (Twipped) 2021-08-11 10:19:07 -07:00
parent 240e09653a
commit f4e45758b6
2 changed files with 4 additions and 1 deletions

View File

@ -34,6 +34,9 @@ const actions = {
}, },
async write ({ output, content }) { async write ({ output, content }) {
if (!content) {
throw new TypeError('Got an empty write?' + output);
}
output = resolve(output); output = resolve(output);
await fs.ensureDir(path.dirname(output)); await fs.ensureDir(path.dirname(output));
await fs.writeFile(output, content); await fs.writeFile(output, content);

View File

@ -53,7 +53,7 @@ module.exports = exports = async function process (tasks, cache) {
} }
if (taskLog && LOG[taskLog[0]]) log.info(...taskLog); if (taskLog && LOG[taskLog[0]]) log.info(...taskLog);
if (cache.isProd) { if (cache.isProd && status.revPath) {
await fs.writeFile(resolve('dist', status.revPath), result); await fs.writeFile(resolve('dist', status.revPath), result);
} }