Skip to content

Commit

Permalink
Merge pull request #157 from ayeshLK/main
Browse files Browse the repository at this point in the history
Add exception handling to the gradle-build
  • Loading branch information
ayeshLK authored Jul 1, 2024
2 parents 53766db + 9e69b73 commit c2fcdc0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/groovy/io/ballerina/plugin/BallerinaPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,11 @@ class BallerinaPlugin implements Plugin<Project> {
"""
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
println "Executing command on windows: ${balPackWithDocker}"
commandLine 'cmd', '/c', "$balPackWithDocker"
try {
commandLine 'cmd', '/c', "$balPackWithDocker"
} catch (Exception e) {
println "[ERROR] Command execution failed: ${e.message}"
}
} else {
commandLine 'sh', '-c', "$balPackWithDocker"
}
Expand Down

0 comments on commit c2fcdc0

Please sign in to comment.