Skip to content

Commit 4531ef8

Browse files
author
Myron Scott
authored
Merge pull request #1135 from cljohnso/fixWindows
Handle UnsupportedOperationException from Files.setPosixFilePermissions
2 parents a37b800 + d8093b3 commit 4531ef8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33

44
# Batch scripts should have Windows endings
55
*.bat eol=crlf
6+
*.cmd eol=crlf

test-common/src/main/java/com/tc/test/BaseScriptTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,10 @@ protected final Path installScript(String scriptResource, Path binPath) throws I
382382
PosixFilePermission.OWNER_WRITE
383383
);
384384
Path f = Files.copy(scriptPath, binPath.resolve(scriptPath.getFileName()), StandardCopyOption.COPY_ATTRIBUTES);
385-
Files.setPosixFilePermissions(f, perms);
385+
try {
386+
Files.setPosixFilePermissions(f, perms);
387+
} catch (UnsupportedOperationException ignored) {
388+
}
386389
return f;
387390
}
388391

0 commit comments

Comments
 (0)