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:
parent
3d82549d8e
commit
57c1d5f821
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue