From 2310f80ef34d54d03def38c3346403a3453050a0 Mon Sep 17 00:00:00 2001 From: "Jocelyn Badgley (Twipped)" Date: Fri, 28 Feb 2020 10:22:53 -0800 Subject: [PATCH] Fix file access errors when saving from cache --- gulp/content/evaluate.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gulp/content/evaluate.js b/gulp/content/evaluate.js index 8c157af..bbbc7aa 100644 --- a/gulp/content/evaluate.js +++ b/gulp/content/evaluate.js @@ -3,6 +3,7 @@ const { resolve } = require('./resolve'); const log = require('fancy-log'); const Promise = require('bluebird'); const fs = require('fs-extra'); +const path = require('path'); const LOG = { new: true, @@ -33,6 +34,7 @@ module.exports = exports = async function process (tasks, cache) { if (status.mode === 'cached') { result = status.cache; + await fs.ensureDir(path.dirname(resolve('dist', output))); await fs.writeFile(resolve('dist', output), result); await cache.touch(task, lastSeen); } else {