精简代码

This commit is contained in:
aixianling
2022-05-26 18:29:26 +08:00
parent c45f0b6faf
commit c33e62cdeb
2 changed files with 3 additions and 25 deletions

View File

@@ -1,20 +0,0 @@
const fse = require("fs-extra");
const execute = require("./exec")
module.exports = info => {
return new Promise((resolve, reject) => {
fse.emptyDir(`zips/${info.id}`, err => {
if (!err) {
execute(`${info.updateShell}`)
.then(() => execute(`${info.libShell}`))
.then(() => resolve())
.catch(errs => {
console.log(errs)
reject(errs)
})
} else {
reject(err)
console.log(err)
}
})
})
}