1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-25 16:07:12 -07:00

Merge pull request #405 from ethauvin/master

Made sure kobaltw (dist) is executable on non-Windows platforms.
This commit is contained in:
Cedric Beust 2017-04-11 05:54:25 -07:00 committed by GitHub
commit 367b4a9e3d

View file

@ -345,6 +345,11 @@ public class Main {
try {
Files.createDirectories(entryPath.getParent());
Files.copy(zipFile.getInputStream(entry), entryPath, StandardCopyOption.REPLACE_EXISTING);
if (!isWindows() && entry.getName().endsWith(KOBALTW)) {
if (!entryPath.toFile().setExecutable(true)) {
log(1, "Couldn't make distribution " + KOBALTW + " executable");
}
}
} catch (FileSystemException ex) {
log(2, "Couldn't copy to " + entryPath);
}