Handle missing .cache directory
Some checks failed
Build and copy to prod / build-and-copy (push) Failing after 3m38s
Some checks failed
Build and copy to prod / build-and-copy (push) Failing after 3m38s
This commit is contained in:
parent
2c297a0298
commit
3b39d8d85f
@ -52,6 +52,9 @@ const cachedContent = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const storeCache = (content = []) => {
|
const storeCache = (content = []) => {
|
||||||
|
if (!fs.existsSync('.cache')) {
|
||||||
|
fs.mkdirSync('.cache');
|
||||||
|
}
|
||||||
fs.writeFileSync(cacheFile, JSON.stringify(content));
|
fs.writeFileSync(cacheFile, JSON.stringify(content));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user