From f0d998c71a1449c220f345aaecd04399193d14c5 Mon Sep 17 00:00:00 2001 From: aixianling Date: Thu, 7 Jul 2022 17:51:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E5=88=B6=E9=A1=B9=E7=9B=AE=E6=89=93?= =?UTF-8?q?=E5=8C=85=E6=8E=A5=E5=8F=A3=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/rest/custom/getZip.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rest/custom/getZip.js b/src/rest/custom/getZip.js index 44f35af..5e785f2 100644 --- a/src/rest/custom/getZip.js +++ b/src/rest/custom/getZip.js @@ -16,7 +16,7 @@ module.exports = { mp: '' }[info.type] || {} const path = `/home/deploy/node-service/${buildPath}`, - dest = `/home/deploy/node-service/customZips/${id}/` + {dist} = info Promise.all([ execute(`/root/node-service/update.sh ${info.name} ${path}`), db.query(sql) @@ -24,8 +24,8 @@ module.exports = { response.send({code: 0}) }, 5000)) execute(`cd ${path}&&npm run apps&&node bin/pages.js ${id}&&npm run build`) - .then(() => fse.emptyDir(dest)) - .then(() => execute(`/root/node-service/move.sh ${info.type} ${path} ${dest}`)) + .then(() => fse.emptyDir(dist)) + .then(() => execute(`/root/node-service/move.sh ${info.type} ${path} ${dist}`)) .then(() => { return db.query(`update node_custom_config set download='${dayjs().format("YYYY-MM-DD HH:mm:ss")}',error='' where ${uniCon}`) }).catch(err => {