From d813628d61dc1730723ae5d3299877fff917c1f9 Mon Sep 17 00:00:00 2001 From: aixianling Date: Fri, 10 Jun 2022 15:06:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=93=E5=8C=85=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/rest/autodeploy/download.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rest/autodeploy/download.js b/src/rest/autodeploy/download.js index db0c384..7b3c876 100644 --- a/src/rest/autodeploy/download.js +++ b/src/rest/autodeploy/download.js @@ -14,7 +14,9 @@ module.exports = { fse.pathExists(path, (err, exists) => { console.log(`${path}=========>${exists}`) if (exists) { - execute(`cd /root/node-service/zips&&zip -r ${info.id}.zip ${path}`).then(() => { + execute(`cd ${path}&&zip -r ${info.id}.zip .`) + .then(() => execute(`cd ${path}&&mv ${info.id}.zip /root/node-service/zips`)) + .then(() => { console.log('压缩完成!') setTimeout(() => { response.download(zipPath)