diff --git a/plugin/bwc-snapshot-dummy-projects/build.gradle b/plugin/bwc-snapshot-dummy-projects/build.gradle index 80c3c4efa9d..2c858b8503a 100644 --- a/plugin/bwc-snapshot-dummy-projects/build.gradle +++ b/plugin/bwc-snapshot-dummy-projects/build.gradle @@ -186,7 +186,12 @@ subprojects { task buildBwcVersion(type: Exec) { dependsOn checkoutXPackBwcBranch, checkoutElasticsearchBwcBranch, writeElasticsearchBuildMetadata, writeXPackBuildMetadata workingDir = xpackCheckoutDir - executable = new File(xpackCheckoutDir, 'gradlew').toString() + if (Os.isFamily(Os.FAMILY_WINDOWS)) { + executable 'cmd' + args '/C', 'call', new File(xpackCheckoutDir, 'gradlew').toString() + } else { + executable = new File(xpackCheckoutDir, 'gradlew').toString() + } final ArrayList commandLineArgs = [":x-pack-elasticsearch:plugin:assemble"] final LogLevel logLevel = gradle.startParameter.logLevel if ([LogLevel.QUIET, LogLevel.WARN, LogLevel.INFO, LogLevel.DEBUG].contains(logLevel)) { @@ -199,7 +204,7 @@ subprojects { } else if (showStacktraceName.equals("ALWAYS_FULL")) { commandLineArgs << "--full-stacktrace" } - args = commandLineArgs + args commandLineArgs } artifacts {