diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy index 5e58bcc7878..2c7656e3d2e 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy @@ -203,6 +203,7 @@ class BuildPlugin implements Plugin { /** Runs the given javascript using jjs from the jdk, and returns the output */ private static String runJavascript(Project project, String javaHome, String script) { ByteArrayOutputStream output = new ByteArrayOutputStream() + script = script.replace('"', '\\"') // gradle/groovy does not properly escape the double quote for windows project.exec { executable = new File(javaHome, 'bin/jrunscript') args '-e', script