[Bug] Fix gradle build on Windows failing from a recent change (#758)
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
4e8c92f2aa
commit
9c95cf424b
|
@ -152,7 +152,9 @@ class NoticeTask extends DefaultTask {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
outputFile.setText(output.toString(), 'UTF-8')
|
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
|
@InputFiles
|
||||||
|
|
Loading…
Reference in New Issue