From e339cdb7cf45fb99f580f997a86fd435cde8a80c Mon Sep 17 00:00:00 2001 From: cheney Date: Wed, 13 Apr 2022 10:59:56 +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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public.script/index.js b/public.script/index.js index c7d44b8..5f0ef77 100644 --- a/public.script/index.js +++ b/public.script/index.js @@ -37,7 +37,7 @@ function sync( cmds , options = {}){ } else { - resolve( stdout.toString() ) + resolve( stdout.toString() , stderr.toString() ) // resolve({ // pid : process.pid, // exitCode : process.exitCode, @@ -95,6 +95,11 @@ function mvn(){ return new Promise(function (cbok, cberr) { sync('mvn package -DskipTests').then(function (value, error) { + if ( error ) { + throw error + + } + l.d( value ) if ( value.indexOf("BUILD SUCCESS") < 0 ){ throw new Error("请检查 maven package 命令")