1
0
Fork 0
mirror of synced 2024-09-28 23:31:43 +12:00

Only clean up app tmp dir if it exists during testing

This commit is contained in:
Andrew Kingston 2021-07-07 09:34:40 +01:00
parent 8f97ea3771
commit e00a37d707

View file

@ -238,7 +238,10 @@ exports.readFileSync = (filepath, options = "utf8") => {
*/ */
exports.cleanup = appIds => { exports.cleanup = appIds => {
for (let appId of appIds) { for (let appId of appIds) {
fs.rmdirSync(join(budibaseTempDir(), appId), { recursive: true }) const path = join(budibaseTempDir(), appId)
if (fs.existsSync(path)) {
fs.rmdirSync(path, { recursive: true })
}
} }
} }