Skip to content

Commit

Permalink
Restructure the code
Browse files Browse the repository at this point in the history
  • Loading branch information
ayeshLK committed Aug 5, 2024
1 parent bab74a6 commit 112d12e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/main/groovy/io/ballerina/plugin/BallerinaPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,6 @@ class BallerinaPlugin implements Plugin<Project> {
return
}

if (ignoreVersionMismatch) {
println("[Warn] Ignoring system-installed and configured Ballerina version mismatch.")
return
}

def output = new ByteArrayOutputStream()
def error = new ByteArrayOutputStream()

Expand Down Expand Up @@ -279,6 +274,10 @@ class BallerinaPlugin implements Plugin<Project> {
def configuredVersion = getProjectBalVersion(project)

if (installedVersion != configuredVersion) {
if (ignoreVersionMismatch) {
println("[Warn] Ignoring Ballerina version mismatch. Expected: $configuredVersion, but found: $installedVersion.")
return
}
throw new GradleException("Ballerina version mismatch. Expected: $configuredVersion, but found: $installedVersion, hence exiting")
}

Expand Down

0 comments on commit 112d12e

Please sign in to comment.