Skip to content

Commit

Permalink
Merge pull request #146 from ayeshLK/main
Browse files Browse the repository at this point in the history
Fix issue in loggin error message
  • Loading branch information
ayeshLK authored Jun 28, 2024
2 parents 539b1fa + 428cdad commit 72009fd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/groovy/io/ballerina/plugin/BallerinaPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,14 @@ class BallerinaPlugin implements Plugin<Project> {
}

def balaPath = "$project.projectDir/${balBuildTarget}/bala"
if (!Files.exists(balaPath)) {
def balaDir = new File(balaDirPath)
if (!balaDir.exists()) {
println("[Error] 'bala' directory does not exist: ${balaPath}, hence exiting")
return
}

// extract bala file to balaArtifact
new File("$project.projectDir/${balBuildTarget}/bala").eachFileMatch(~/.*.bala/) { balaFile ->
balaDir.eachFileMatch(~/.*.bala/) { balaFile ->
project.copy {
from project.zipTree(balaFile)
into new File("$balaArtifact/bala/${packageOrg}/${packageName}/${balaVersion}/${platform}")
Expand Down

0 comments on commit 72009fd

Please sign in to comment.