From 5f9c7f6669ff8e3482fa3a8fcdfc8277f8588769 Mon Sep 17 00:00:00 2001 From: Jay Cho Date: Wed, 14 Feb 2024 15:16:10 +0900 Subject: [PATCH] Update workload install script --- workload/scripts/workload-install.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/workload/scripts/workload-install.ps1 b/workload/scripts/workload-install.ps1 index 669727e..285e4d8 100644 --- a/workload/scripts/workload-install.ps1 +++ b/workload/scripts/workload-install.ps1 @@ -103,7 +103,13 @@ function Get-LatestVersion([string]$Id) { function Get-Package([string]$Id, [string]$Version, [string]$Destination, [string]$FileExt = "nupkg") { $OutFileName = "$Id.$Version.$FileExt" $OutFilePath = Join-Path -Path $Destination -ChildPath $OutFileName + + if ($Id -match ".net[0-9]+$") { + $Id = $Id -replace (".net[0-9]+", "") + } + Invoke-WebRequest -Uri "https://www.nuget.org/api/v2/package/$Id/$Version" -OutFile $OutFilePath + return $OutFilePath }