Fix integration tests and gradle run to work on windoze
This commit is contained in:
parent
609d9db470
commit
a01f86aaac
|
@ -285,11 +285,8 @@ class ClusterFormationTasks {
|
||||||
/** Adds a task to start an elasticsearch node with the given configuration */
|
/** Adds a task to start an elasticsearch node with the given configuration */
|
||||||
static Task configureStartTask(String name, Project project, Task setup, NodeInfo node) {
|
static Task configureStartTask(String name, Project project, Task setup, NodeInfo node) {
|
||||||
String executable
|
String executable
|
||||||
List<String> esArgs = []
|
|
||||||
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
||||||
executable = 'cmd'
|
executable = 'cmd'
|
||||||
esArgs.add('/C')
|
|
||||||
esArgs.add('call')
|
|
||||||
} else {
|
} else {
|
||||||
executable = 'sh'
|
executable = 'sh'
|
||||||
}
|
}
|
||||||
|
@ -326,6 +323,9 @@ class ClusterFormationTasks {
|
||||||
|
|
||||||
ant.exec(executable: executable, spawn: node.config.daemonize, dir: node.cwd, taskname: 'elasticsearch') {
|
ant.exec(executable: executable, spawn: node.config.daemonize, dir: node.cwd, taskname: 'elasticsearch') {
|
||||||
node.env.each { key, value -> env(key: key, value: value) }
|
node.env.each { key, value -> env(key: key, value: value) }
|
||||||
|
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
||||||
|
arg(value: '/C')
|
||||||
|
}
|
||||||
arg(value: script)
|
arg(value: script)
|
||||||
node.args.each { arg(value: it) }
|
node.args.each { arg(value: it) }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue