From cd29f6987a181e707c68bb8b4cf052af6af9fc05 Mon Sep 17 00:00:00 2001 From: Raphire <9938813+Raphire@users.noreply.github.com> Date: Mon, 1 Dec 2025 21:04:39 +0100 Subject: [PATCH] Updated Get.ps1 to always fetch latest release, instead of using a hardcoded release version #381 Thanks @agadiffe for the suggestion! --- Get.ps1 | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Get.ps1 b/Get.ps1 index dd4b240..2165bc8 100644 --- a/Get.ps1 +++ b/Get.ps1 @@ -90,8 +90,18 @@ Write-Output "------------------------------------------------------------------ Write-Output "> Downloading Win11Debloat..." -# Download latest version of Win11Debloat from github as zip archive -Invoke-RestMethod https://api.github.com/repos/Raphire/Win11Debloat/zipball/2025.11.30 -OutFile "$env:TEMP/win11debloat.zip" +# Download latest version of Win11Debloat from GitHub as zip archive +try { + $LatestReleaseUri = (Invoke-RestMethod https://api.github.com/repos/Raphire/Win11Debloat/releases/latest).zipball_url + Invoke-RestMethod $LatestReleaseUri -OutFile "$env:TEMP/win11debloat.zip" +} +catch { + Write-Host "Error: Unable to fetch latest release from GitHub. Please check your internet connection and try again." -ForegroundColor Red + Write-Output "" + Write-Output "Press enter to exit..." + Read-Host | Out-Null + Exit +} # Remove old script folder if it exists, except for CustomAppsList and SavedSettings files if (Test-Path "$env:TEMP/Win11Debloat") {