From 472c2f4d2e69aa4a0984a5e140477e3ffaa1ae14 Mon Sep 17 00:00:00 2001 From: mezz Date: Sat, 27 Feb 2016 00:51:17 -0800 Subject: [PATCH] Fix gradle not working with cygwin --- gradlew | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gradlew b/gradlew index 97fac783e..91a7e269e 100755 --- a/gradlew +++ b/gradlew @@ -42,6 +42,11 @@ case "`uname`" in ;; esac +# For Cygwin, ensure paths are in UNIX format before anything is touched. +if $cygwin ; then + [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` +fi + # Attempt to set APP_HOME # Resolve links: $0 may be a link PRG="$0" @@ -109,7 +114,6 @@ fi if $cygwin ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`