Skip to content

Commit 2e9c66b

Browse files
committed
fix: Ensure extract command for jar that are flagged as executable returns an exit code 1
1 parent 86b0c76 commit 2e9c66b

File tree

1 file changed

+2
-3
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-jarmode-tools/src/main/java/org/springframework/boot/jarmode/tools

1 file changed

+2
-3
lines changed

spring-boot-project/spring-boot-tools/spring-boot-jarmode-tools/src/main/java/org/springframework/boot/jarmode/tools/ExtractCommand.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,8 @@ private void checkJarCompatibility() throws IOException {
147147
try (ZipInputStream stream = new ZipInputStream(new FileInputStream(file))) {
148148
ZipEntry entry = stream.getNextEntry();
149149
if (entry == null) {
150-
throw new AbortException(
151-
"File '%s' is not compatible; ensure jar file is valid and launch script is not enabled"
152-
.formatted(file));
150+
System.err.printf("File '%s' is not compatible; ensure jar file is valid and launch script is not enabled%n", file);
151+
System.exit(1);
153152
}
154153
}
155154
}

0 commit comments

Comments
 (0)