From 6d1b55c7b2106548ff212d0cd52a067e7aabfe18 Mon Sep 17 00:00:00 2001 From: ayeshLK Date: Mon, 1 Jul 2024 16:21:34 +0530 Subject: [PATCH] Use exec-result for command line task execution --- src/main/groovy/io/ballerina/plugin/BallerinaPlugin.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/groovy/io/ballerina/plugin/BallerinaPlugin.groovy b/src/main/groovy/io/ballerina/plugin/BallerinaPlugin.groovy index 7184d2d..1173acf 100644 --- a/src/main/groovy/io/ballerina/plugin/BallerinaPlugin.groovy +++ b/src/main/groovy/io/ballerina/plugin/BallerinaPlugin.groovy @@ -267,7 +267,7 @@ class BallerinaPlugin implements Plugin { def outStream = new ByteArrayOutputStream() def errStream = new ByteArrayOutputStream() // Pack bala first - project.exec { + def execResults = project.exec { workingDir project.projectDir environment 'JAVA_OPTS', '-DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true' if (buildOnDocker) { @@ -296,7 +296,7 @@ class BallerinaPlugin implements Plugin { } } } - println("StdOut: ${outStream.toString()} \n ErrOut: ${errStream.toString()}\n") + println("Result: ${execResults.exitValue} ${execResults.properties}\nStdOut: ${outStream.toString()} \nErrOut: ${errStream.toString()}\n") def balaPath = "$project.projectDir/${balBuildTarget}/bala" def balaDir = new File(balaPath)