[TEST] Create checkout directory on Windows before trimming path

The getShortPathName method can only be used on a directory that actually exists, otherwise it will fail with a cryptic message.

Original commit: elastic/x-pack-elasticsearch@44552dcfc8
This commit is contained in:
Yannick Welsch 2017-12-18 18:13:54 +01:00
parent c92a216517
commit 8ba08ccea9
1 changed files with 2 additions and 0 deletions

View File

@ -33,6 +33,7 @@ subprojects {
*/
Object esCheckoutPath = """${->
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
esCheckoutDir.mkdirs()
NodeInfo.getShortPathName(esCheckoutDir.toString())
} else {
esCheckoutDir.toString()
@ -41,6 +42,7 @@ subprojects {
File xpackCheckoutDir = file("${esCheckoutDir}-extra/x-pack-elasticsearch")
Object xpackCheckoutPath = """${->
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
xpackCheckoutDir.mkdirs()
NodeInfo.getShortPathName(xpackCheckoutDir.toString())
} else {
xpackCheckoutDir.toString()