From a77d0a50738a9e0ef37a2faa3ee50d993cb01bea Mon Sep 17 00:00:00 2001 From: Kajal4414 <81718060+Kajal4414@users.noreply.github.com> Date: Sun, 24 Nov 2024 22:27:44 +0530 Subject: [PATCH] fix script.ps1 --- .github/scripts/script.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/script.ps1 b/.github/scripts/script.ps1 index 72d8516d..ec9751ad 100644 --- a/.github/scripts/script.ps1 +++ b/.github/scripts/script.ps1 @@ -115,8 +115,8 @@ $baseUrl = "https://nodejs.org/download/release/latest/" $softwareList += [PSCustomObject]@{ appName = "Node.js" - version = ((Invoke-WebRequest $baseUrl -UseBasicParsing).Links | Where-Object { $_.Href -like 'node*x64.msi' } | Select-Object -First 1 -ExpandProperty Href) -replace '.*node-v(\d+\.\d+\.\d+).*', '$1' - url = $baseUrl + ((Invoke-WebRequest $baseUrl -UseBasicParsing).Links | Where-Object { $_.Href -like 'node*x64.msi' } | Select-Object -First 1 -ExpandProperty Href) + version = ((Invoke-WebRequest $baseUrl -UseBasicParsing).Links | Where-Object { $_.Href -match 'node-v(\d+\.\d+\.\d+)-x64\.msi' } | Select-Object -First 1).Href -replace '.*node-v(\d+\.\d+\.\d+)-x64\.msi', '$1' + url = "https://nodejs.org" + ((Invoke-WebRequest $baseUrl -UseBasicParsing).Links | Where-Object { $_.Href -match 'node-v(\d+\.\d+\.\d+)-x64\.msi' } | Select-Object -First 1 -ExpandProperty Href) } # VS Code