From 141af746c9ca003e9b6d4de7cf34e71b2939ebf1 Mon Sep 17 00:00:00 2001 From: cheney Date: Sat, 2 Apr 2022 17:35:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public.script/index.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/public.script/index.js b/public.script/index.js index 328501b..6b2d9fe 100644 --- a/public.script/index.js +++ b/public.script/index.js @@ -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 命令")