From b1fd50f67e7152ad8def2674d311b44bad2c73fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Justinas=20Stankevi=C4=8Dius?= Date: Mon, 8 May 2023 12:10:37 +0300 Subject: [PATCH] Create ToolchainDir if does not exist (#25693) --- build.assets/windows/build.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.assets/windows/build.ps1 b/build.assets/windows/build.ps1 index e1e09727994..b10b30300a0 100644 --- a/build.assets/windows/build.ps1 +++ b/build.assets/windows/build.ps1 @@ -89,6 +89,7 @@ function Install-Go { [string] $GoVersion ) begin { + New-Item -Path "$ToolchainDir" -ItemType Directory -Force | Out-Null $GoDownloadUrl = "https://go.dev/dl/go$GoVersion.windows-amd64.zip" $GoInstallZip = "$ToolchainDir/go$GoVersion.windows-amd64.zip" Invoke-WebRequest -Uri $GoDownloadUrl -OutFile $GoInstallZip @@ -124,6 +125,7 @@ function Install-Node { [string] $NodeVersion ) begin { + New-Item -Path "$ToolchainDir" -ItemType Directory -Force | Out-Null $NodeZipfile = "$ToolchainDir/node-$NodeVersion-win-x64.zip" Invoke-WebRequest -Uri https://nodejs.org/download/release/v$NodeVersion/node-v$NodeVersion-win-x64.zip -OutFile $NodeZipfile Expand-Archive -Path $NodeZipfile -DestinationPath $ToolchainDir