From e4e2ff9f5fbc3e2ae7d215cfddc55c7651c4ff86 Mon Sep 17 00:00:00 2001 From: ayeshLK Date: Thu, 27 Jun 2024 14:14:44 +0530 Subject: [PATCH] Fix issue in logging error message --- src/main/groovy/io/ballerina/plugin/BallerinaPlugin.groovy | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/groovy/io/ballerina/plugin/BallerinaPlugin.groovy b/src/main/groovy/io/ballerina/plugin/BallerinaPlugin.groovy index fef31aa..7e58121 100644 --- a/src/main/groovy/io/ballerina/plugin/BallerinaPlugin.groovy +++ b/src/main/groovy/io/ballerina/plugin/BallerinaPlugin.groovy @@ -292,13 +292,14 @@ class BallerinaPlugin implements Plugin { } 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}")