Browse Source

Only clean up app tmp dir if it exists during testing

pull/1940/head
Andrew Kingston 5 years ago
parent
commit
e00a37d707
  1. 5
      packages/server/src/utilities/fileSystem/index.js

5
packages/server/src/utilities/fileSystem/index.js

@ -238,7 +238,10 @@ exports.readFileSync = (filepath, options = "utf8") => {
*/
exports.cleanup = 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 })
}
}
}

Loading…
Cancel
Save