mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-01-31 07:16:17 +00:00
Fix file access errors when saving from cache
This commit is contained in:
parent
697ee7bc8e
commit
2310f80ef3
@ -3,6 +3,7 @@ const { resolve } = require('./resolve');
|
|||||||
const log = require('fancy-log');
|
const log = require('fancy-log');
|
||||||
const Promise = require('bluebird');
|
const Promise = require('bluebird');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
const LOG = {
|
const LOG = {
|
||||||
new: true,
|
new: true,
|
||||||
@ -33,6 +34,7 @@ module.exports = exports = async function process (tasks, cache) {
|
|||||||
|
|
||||||
if (status.mode === 'cached') {
|
if (status.mode === 'cached') {
|
||||||
result = status.cache;
|
result = status.cache;
|
||||||
|
await fs.ensureDir(path.dirname(resolve('dist', output)));
|
||||||
await fs.writeFile(resolve('dist', output), result);
|
await fs.writeFile(resolve('dist', output), result);
|
||||||
await cache.touch(task, lastSeen);
|
await cache.touch(task, lastSeen);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user