update build process
This commit is contained in:
19
build/plugin/exec.js
Normal file
19
build/plugin/exec.js
Normal file
@ -0,0 +1,19 @@
|
||||
const { exec } = require('child_process')
|
||||
|
||||
function doExec (execString, maxBuffer = 1024 ** 5) {
|
||||
return new Promise(resolve => {
|
||||
exec(execString, {
|
||||
maxBuffer
|
||||
}, err => {
|
||||
if (err) {
|
||||
console.error(err)
|
||||
|
||||
resolve(false)
|
||||
} else {
|
||||
resolve(true)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = doExec
|
Reference in New Issue
Block a user