diff --git a/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/RepackagerTests.java b/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/RepackagerTests.java index 0afdac652f2d..d7394d8c6e7e 100644 --- a/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/RepackagerTests.java +++ b/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/RepackagerTests.java @@ -402,11 +402,16 @@ public void addLauncherScript() throws Exception { LaunchScript script = new MockLauncherScript("ABC"); repackager.repackage(dest, NO_LIBRARIES, script); byte[] bytes = FileCopyUtils.copyToByteArray(dest); - assertThat(Files.getPosixFilePermissions(dest.toPath()), - hasItem(PosixFilePermission.OWNER_EXECUTE)); assertThat(new String(bytes), startsWith("ABC")); assertThat(hasLauncherClasses(source), equalTo(false)); assertThat(hasLauncherClasses(dest), equalTo(true)); + try { + assertThat(Files.getPosixFilePermissions(dest.toPath()), + hasItem(PosixFilePermission.OWNER_EXECUTE)); + } + catch (UnsupportedOperationException ex) { + // Probably running the test on Windows + } } private boolean hasLauncherClasses(File file) throws IOException {