Skip to content

Commit

Permalink
Fix unknown property issue with buildResults variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ayeshLK committed Jun 28, 2024
1 parent 5a519a6 commit cb8aaa0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main/groovy/io/ballerina/plugin/BallerinaPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class BallerinaPlugin implements Plugin<Project> {
project.exec {
workingDir project.projectDir
environment 'JAVA_OPTS', '-DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true'
def buildResult = new ByteArrayOutputStream()
standardOutput = new ByteArrayOutputStream()
if (buildOnDocker) {
createDockerEnvFile("$project.projectDir/docker.env")
def balPackWithDocker = """
Expand All @@ -280,22 +280,18 @@ class BallerinaPlugin implements Plugin<Project> {
"""
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine 'cmd', '/c', "$balPackWithDocker && exit %%ERRORLEVEL%%"
standardOutput = buildResult
} else {
commandLine 'sh', '-c', "$balPackWithDocker"
standardOutput = buildResult
}
} else {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine 'cmd', '/c', "$distributionBinPath/bal.bat pack --target-dir ${balBuildTarget} --offline && exit %%ERRORLEVEL%%"
standardOutput = buildResult
} else {
commandLine 'sh', '-c', "$distributionBinPath/bal pack --target-dir ${balBuildTarget} --offline"
standardOutput = buildResult
}
}
}
println "Command output: ${buildResult.toString()}"
println "Command output: ${standardOutput.toString()}"

def balaPath = "$project.projectDir/${balBuildTarget}/bala"
def balaDir = new File(balaPath)
Expand Down

0 comments on commit cb8aaa0

Please sign in to comment.