Skip to content

Commit 9737e53

Browse files
committed
Exit if there are errors in executable generation
1 parent d7c771d commit 9737e53

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cli/ballerina-cli/src/main/java/io/ballerina/cli/task/CreateExecutableTask.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ public void execute(Project project) {
134134
if (!emitResult.diagnostics().diagnostics().isEmpty() && !isHideTaskOutput) {
135135
emitResult.diagnostics().diagnostics().forEach(d -> out.println("\n" + d.toString()));
136136
}
137+
if (emitResult.diagnostics().hasErrors()) {
138+
throw createLauncherException("build failed due to errors");
139+
}
137140

138141
} catch (ProjectException e) {
139142
throw createLauncherException(e.getMessage());

0 commit comments

Comments
 (0)