[Bug] Fix gradle build on Windows failing from a recent change (#765)
A recent change as part of the commit c2e816ec
introduced a bug where the build is failing on Windows. The change was made to include the NOTICE.txt file as read-only in the distributions. The code fails on Windows as it's not a POSIX-compliant. This commit adds a check on the current operating system.
Signed-off-by: Rabi Panda <adnapibar@gmail.com>
This commit is contained in:
parent
9a654aa667
commit
b6ca8e6db4
|
@ -152,7 +152,9 @@ class NoticeTask extends DefaultTask {
|
|||
}
|
||||
}
|
||||
outputFile.setText(output.toString(), 'UTF-8')
|
||||
Files.setPosixFilePermissions(outputFile.toPath(), PosixFilePermissions.fromString("rw-r--r--"))
|
||||
if (OS.current() != OS.WINDOWS) {
|
||||
Files.setPosixFilePermissions(outputFile.toPath(), PosixFilePermissions.fromString("rw-r--r--"))
|
||||
}
|
||||
}
|
||||
|
||||
@InputFiles
|
||||
|
|
Loading…
Reference in New Issue