From f4e45758b6da5959bdf82a46b12e5e4d4183a087 Mon Sep 17 00:00:00 2001 From: "Jocelyn Badgley (Twipped)" Date: Wed, 11 Aug 2021 10:19:07 -0700 Subject: [PATCH] Ammending a small bug that came up in the curvyandtrans codebase --- build/actions.js | 3 +++ build/evaluate.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/build/actions.js b/build/actions.js index f9037c0..e8340c6 100644 --- a/build/actions.js +++ b/build/actions.js @@ -34,6 +34,9 @@ const actions = { }, async write ({ output, content }) { + if (!content) { + throw new TypeError('Got an empty write?' + output); + } output = resolve(output); await fs.ensureDir(path.dirname(output)); await fs.writeFile(output, content); diff --git a/build/evaluate.js b/build/evaluate.js index 92a7cbf..92f7e6d 100644 --- a/build/evaluate.js +++ b/build/evaluate.js @@ -53,7 +53,7 @@ module.exports = exports = async function process (tasks, cache) { } if (taskLog && LOG[taskLog[0]]) log.info(...taskLog); - if (cache.isProd) { + if (cache.isProd && status.revPath) { await fs.writeFile(resolve('dist', status.revPath), result); }