Skip to content

Commit

Permalink
修改maxBuffer大小
Browse files Browse the repository at this point in the history
  • Loading branch information
fuchengwei committed Sep 19, 2020
1 parent d90c4de commit b6a6805
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions lib/commands/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const {
} = require('../utils')

const ssh = new NodeSSH()
const maxBuffer = 5000 * 1024

// 是否确认部署
const confirmDeploy = (message) => {
Expand Down Expand Up @@ -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('打包失败')
Expand Down

0 comments on commit b6a6805

Please sign in to comment.