File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 1717 * under the License.
1818 */
1919
20-
20+ import org.apache.tools.ant.taskdefs.condition.Os
2121import org.elasticsearch.gradle.LoggedExec
2222import org.elasticsearch.gradle.Version
2323import java.util.regex.Matcher
@@ -118,7 +118,12 @@ if (project.hasProperty('bwcVersion')) {
118118 task buildBwcVersion(type : Exec ) {
119119 dependsOn checkoutBwcBranch, writeBuildMetadata
120120 workingDir = checkoutDir
121- executable = new File (checkoutDir, ' gradlew' ). toString()
121+ if (Os . isFamily(Os . FAMILY_WINDOWS )) {
122+ executable ' cmd'
123+ args ' /C' , ' call' , new File (checkoutDir, ' gradlew' ). toString()
124+ } else {
125+ executable = new File (checkoutDir, ' gradlew' ). toString()
126+ }
122127 final ArrayList<String > commandLineArgs = [
123128 " :distribution:deb:assemble" ,
124129 " :distribution:rpm:assemble" ,
@@ -135,7 +140,7 @@ if (project.hasProperty('bwcVersion')) {
135140 } else if (showStacktraceName. equals(" ALWAYS_FULL" )) {
136141 commandLineArgs << " --full-stacktrace"
137142 }
138- args = commandLineArgs
143+ args commandLineArgs
139144 doLast {
140145 List missing = [bwcDeb, bwcRpm, bwcZip]. grep { file ->
141146 false == file. exists()
You can’t perform that action at this time.
0 commit comments