Skip to content

Commit 633caf0

Browse files
author
Matthew Sackman
committed
Correct use of mktemp in ant build, because the OS X version must have a template provided. Amazed none of the OS X users spotted the test suite was failing...
1 parent 21cc368 commit 633caf0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

build.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,17 @@
116116
<property name="SSL_P12_PASSWORD" value="${env.PASSWORD}"/>
117117
</target>
118118

119-
<target name="make-client-keystore" if="SSL_AVAILABLE" depends="detect-ssl">
119+
<target name="detect-tmpdir">
120+
<property environment="env"/>
121+
<condition property="TMPDIR" value="${env.TMPDIR}" else="/tmp">
122+
<available file="${env.TMPDIR}" type="dir"/>
123+
</condition>
124+
</target>
125+
126+
<target name="make-client-keystore" if="SSL_AVAILABLE" depends="detect-ssl, detect-tmpdir">
120127
<exec executable="mktemp" outputproperty="CLIENT_KEYSTORE" failonerror="true" osfamily="unix">
121128
<arg value="-u"/>
129+
<arg value="${TMPDIR}/tmp.XXXXXXXXXX"/>
122130
</exec>
123131
<exec executable="keytool" failonerror="true" osfamily="unix">
124132
<arg line="-import"/>
@@ -134,6 +142,7 @@
134142
</exec>
135143
<exec executable="mktemp" outputproperty="CLIENT_KEYSTORE_EMPTY" failonerror="true" osfamily="unix">
136144
<arg value="-u"/>
145+
<arg value="${TMPDIR}/tmp.XXXXXXXXXX"/>
137146
</exec>
138147
<!-- can't create an empty keystore, so add cert in and then delete it! -->
139148
<exec executable="keytool" failonerror="true" osfamily="unix">

0 commit comments

Comments
 (0)