From e061db2d1b7150031ad914ef1021c26ba745badd Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 19 Jul 2016 09:50:53 -0700 Subject: [PATCH] Fix kobatlw shebang for Cygwin/MinGW. --- .../wrapper/src/main/java/com/beust/kobalt/wrapper/Main.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 64179098..892ba3cb 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 @@ -271,13 +271,13 @@ public class Main { // For kobaltw: try to generate it with the correct env shebang. // File envFile = new File("/bin/env"); - if (!envFile.exists()) { + if (!envFile.canExecute()) { envFile = new File("/usr/bin/env"); } String content = ""; - content = "#!" + envFile.getAbsolutePath() + " bash\n"; + content = "#!" + envFile.getPath() + " bash\n"; log(2, " Generating " + KOBALTW + " with shebang.");