修改脚本

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 )
} else {
resolve({
pid : process.pid,
exitCode : process.exitCode,
stdout : stdout.toString(),
stderr : stderr.toString()
})
resolve( stdout.toString() )
// resolve({
// pid : process.pid,
// exitCode : process.exitCode,
// stdout : stdout.toString(),
// stderr : stderr.toString()
// })
}
})
console.log( "process", process.pid )
@ -168,7 +170,6 @@ 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 命令")