From 934602b2a64c84d3efbae7d488eda4b03ef60760 Mon Sep 17 00:00:00 2001 From: khoind4 Date: Fri, 22 Nov 2024 14:32:17 +0700 Subject: [PATCH] fix: fix installation build in powershell (windows) New-TemporaryFile doesn't work in cmd More info: https://github.com/PowerShell/PowerShell/issues/14100 --- Build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build.ps1 b/Build.ps1 index 4d76e24..ad20996 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -56,7 +56,7 @@ function Download-Prebuilt($feature) { } # Download and extract the artifact - $TempFile = New-TemporaryFile | Rename-Item -NewName { $_.Name + ".zip" } -PassThru + $TempFile = Get-Item ([System.IO.Path]::GetTempFilename()) | Rename-Item -NewName { $_.Name + ".zip" } -PassThru Invoke-WebRequest -Uri $ARTIFACT_URL -OutFile $TempFile Expand-Archive -Path $TempFile -DestinationPath $TARGET_DIR -Force Remove-Item $TempFile