Ensure tmpDir/.budibase always exists
This commit is contained in:
parent
240c014ae3
commit
887470d4b5
1 changed files with 8 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
const { join } = require("path")
|
||||
const { tmpdir } = require("os")
|
||||
const fs = require("fs")
|
||||
const env = require("../environment")
|
||||
|
||||
/****************************************************
|
||||
|
@ -16,6 +17,11 @@ exports.ObjectStoreBuckets = {
|
|||
PLUGINS: env.PLUGIN_BUCKET_NAME,
|
||||
}
|
||||
|
||||
exports.budibaseTempDir = function () {
|
||||
return join(tmpdir(), ".budibase")
|
||||
const bbTmp = join(tmpdir(), ".budibase")
|
||||
if (!fs.existsSync(bbTmp)) {
|
||||
fs.mkdirSync(bbTmp)
|
||||
}
|
||||
|
||||
exports.budibaseTempDir = function () {
|
||||
return bbTmp
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue