Build: Fix jrunscript command to quote correctly on windows (#23539)

As noted
in https://github.com/elastic/elasticsearch/issues/22898#issuecomment-277192425
This commit is contained in:
Ryan Ernst 2017-03-11 10:15:51 -08:00 committed by GitHub
parent 3d82549d8e
commit 57c1d5f821
1 changed files with 1 additions and 0 deletions

View File

@ -203,6 +203,7 @@ class BuildPlugin implements Plugin<Project> {
/** 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