diff --git a/lib/commands/deploy.js b/lib/commands/deploy.js index 1fbd27c..ba44e20 100644 --- a/lib/commands/deploy.js +++ b/lib/commands/deploy.js @@ -13,6 +13,7 @@ const { } = require('../utils') const ssh = new NodeSSH() +const maxBuffer = 5000 * 1024 // 是否确认部署 const confirmDeploy = (message) => { @@ -62,15 +63,19 @@ const execBuild = async (script) => { spinner.start() await new Promise((resolve, reject) => { - childProcess.exec(script, { cwd: process.cwd() }, (e) => { - spinner.stop() - if (e === null) { - succeed('打包成功') - resolve() - } else { - reject(e.message) + childProcess.exec( + script, + { cwd: process.cwd(), maxBuffer: maxBuffer }, + (e) => { + spinner.stop() + if (e === null) { + succeed('打包成功') + resolve() + } else { + reject(e.message) + } } - }) + ) }) } catch (e) { error('打包失败')