修改脚本

This commit is contained in:
cheney 2022-04-02 17:35:44 +08:00
parent 5b411df865
commit 141af746c9

View File

@ -36,12 +36,14 @@ function sync( cmds , options = {}){
reject( e ) reject( e )
} else { } else {
resolve({
pid : process.pid, resolve( stdout.toString() )
exitCode : process.exitCode, // resolve({
stdout : stdout.toString(), // pid : process.pid,
stderr : stderr.toString() // exitCode : process.exitCode,
}) // stdout : stdout.toString(),
// stderr : stderr.toString()
// })
} }
}) })
console.log( "process", process.pid ) console.log( "process", process.pid )
@ -168,7 +170,6 @@ async function main() {
sync('git status').then(function (value, error) { sync('git status').then(function (value, error) {
l.d( value ) l.d( value )
value = value.stdout + value.stderr
if ( value.indexOf("Command failed") > 0 ){ if ( value.indexOf("Command failed") > 0 ){
throw new Error("请检查 git 命令") throw new Error("请检查 git 命令")