Skip to content

Commit 39852d0

Browse files
committed
fix temporary path for Unix environments
Apparently, on Unix, there is no Temp environment variable.
1 parent 5281c03 commit 39852d0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dev/launch.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,13 @@ function New-TemporaryPath {
4545

4646
Write-Host "Creating new temporary path: $Prefix"
4747

48+
$temp = [System.IO.Path]::GetTempPath()
49+
4850
# Remove Previous Temporary Paths
49-
Remove-Item -Path "$env:Temp\$Prefix*" -Force -Recurse -ErrorAction SilentlyContinue
51+
Remove-Item -Path "$temp\$Prefix*" -Force -Recurse -ErrorAction SilentlyContinue
5052

5153
# Create New Temporary Path
52-
$item = New-Item -Path $env:TEMP -Name "$($Prefix)_$(Get-Random)" -ItemType Directory
54+
$item = New-Item -Path $temp -Name "$($Prefix)_$(Get-Random)" -ItemType Directory
5355
$item.FullName
5456
}
5557

0 commit comments

Comments
 (0)