From 0f88993424b2111f279e7675c347e711fb3530c3 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 10 Apr 2017 23:23:18 -0700 Subject: [PATCH] Made sure kobaltw in ~/.kobalt/wrapper/dist/ is executable on non-Windows platforms. --- .../wrapper/src/main/java/com/beust/kobalt/wrapper/Main.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/wrapper/src/main/java/com/beust/kobalt/wrapper/Main.java b/modules/wrapper/src/main/java/com/beust/kobalt/wrapper/Main.java index f91bf3c1..f57db6d2 100644 --- a/modules/wrapper/src/main/java/com/beust/kobalt/wrapper/Main.java +++ b/modules/wrapper/src/main/java/com/beust/kobalt/wrapper/Main.java @@ -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); }