From 63513def6ba888a82b945037350304dd12e44831 Mon Sep 17 00:00:00 2001 From: Ronny Polley Date: Wed, 9 Oct 2024 08:36:14 +0200 Subject: [PATCH] use .net method to get temp path --- Tests/TestUtils.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tests/TestUtils.ps1 b/Tests/TestUtils.ps1 index 9089fff..d25b8d2 100644 --- a/Tests/TestUtils.ps1 +++ b/Tests/TestUtils.ps1 @@ -19,7 +19,8 @@ function Mock-Api-Call-Grails-1.1.1-Available($Available) { function Mock-PSDK-Dir { $Script:backup_PSDK_DIR = $Global:PSDK_DIR $randomName = (-join ((65..90) + (97..122) | Get-Random -Count 5 | % {[char]$_})) - $testPath = "$env:Temp\$randomName" + $tempDir = [System.IO.Path]::GetTempPath() + $testPath = "$tempDir\$randomName" New-Item -ItemType Directory "$testPath\.posh-sdk" | Out-Null $Global:PSDK_DIR = (Get-Item "$testPath\.posh-sdk").FullName New-Item -ItemType Directory "$Global:PSDK_DIR\grails" | Out-Null