Skip to content

Commit 2a60ba6

Browse files
authored
Revert tmpdir (#40312)
* Revert "Configure TMP for test nodes on Windows (#39959)" This reverts commit 97562a8. * Configure a tmp dir without spaces * Pass on TMP instead of changing it
1 parent 9bbc123 commit 2a60ba6

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy

+4-4
Original file line numberDiff line numberDiff line change
@@ -693,10 +693,10 @@ class ClusterFormationTasks {
693693
node.args.each { arg(value: it) }
694694
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
695695
// Having no TMP on Windows defaults to C:\Windows and permission errors
696-
// Since we configure ant to run with a new environment above, we need to set this to a dir we have access to
697-
File tmpDir = new File(node.baseDir, "tmp")
698-
tmpDir.mkdirs()
699-
env(key: "TMP", value: tmpDir.absolutePath)
696+
// Since we configure ant to run with a new environment above, we need to explicitly pass this
697+
String tmp = System.getenv("TMP")
698+
assert tmp != null
699+
env(key: "TMP", value: tmp)
700700
}
701701
}
702702
}

distribution/src/bin/elasticsearch

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ source "`dirname "$0"`"/elasticsearch-env
1818

1919
ES_JVM_OPTIONS="$ES_PATH_CONF"/jvm.options
2020
JVM_OPTIONS=`"$JAVA" -cp "$ES_CLASSPATH" org.elasticsearch.tools.launchers.JvmOptionsParser "$ES_JVM_OPTIONS"`
21-
ES_JAVA_OPTS="${JVM_OPTIONS//\"\$\{ES_TMPDIR\}\"/$ES_TMPDIR} $ES_JAVA_OPTS"
21+
ES_JAVA_OPTS="${JVM_OPTIONS//\$\{ES_TMPDIR\}/$ES_TMPDIR} $ES_JAVA_OPTS"
2222

2323
# manual parsing to find out, if process should be detached
2424
if ! echo $* | grep -E '(^-d |-d$| -d |--daemonize$|--daemonize )' > /dev/null; then

distribution/src/config/jvm.options

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
-Dlog4j.shutdownHookEnabled=false
8787
-Dlog4j2.disable.jmx=true
8888

89-
-Djava.io.tmpdir="${ES_TMPDIR}"
89+
-Djava.io.tmpdir=${ES_TMPDIR}
9090

9191
## heap dumps
9292

0 commit comments

Comments
 (0)