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)