修改脚本

This commit is contained in:
cheney 2022-04-02 17:34:38 +08:00
parent 2f103856c8
commit 5b411df865

View File

@ -13,7 +13,7 @@ function sync( cmds , options = {}){
}
options = Object.assign({
cwd : os.tmpdir(),
// cwd : os.tmpdir(),
encoding: 'buffer'
}, options)
@ -39,8 +39,8 @@ function sync( cmds , options = {}){
resolve({
pid : process.pid,
exitCode : process.exitCode,
stdout : stdout,
stderr : stderr
stdout : stdout.toString(),
stderr : stderr.toString()
})
}
})
@ -168,6 +168,7 @@ async function main() {
sync('git status').then(function (value, error) {
l.d( value )
value = value.stdout + value.stderr
if ( value.indexOf("Command failed") > 0 ){
throw new Error("请检查 git 命令")