From 65cacd0d192675c6178d1452c3241c05cecd0a6c Mon Sep 17 00:00:00 2001 From: Romain <96626929+Romanitho@users.noreply.github.com> Date: Mon, 7 Mar 2022 03:28:16 +0100 Subject: [PATCH] Fixed issue --- Winget-AutoUpdate/winget-upgrade.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Winget-AutoUpdate/winget-upgrade.ps1 b/Winget-AutoUpdate/winget-upgrade.ps1 index a907ddf..44af577 100644 --- a/Winget-AutoUpdate/winget-upgrade.ps1 +++ b/Winget-AutoUpdate/winget-upgrade.ps1 @@ -268,7 +268,7 @@ function Update-WAU{ #Send available update notification $Title = $NotifLocale.local.outputs.output[2].title -f "Winget-AutoUpdate" - $Message = $NotifLocale.local.outputs.output[2].message -f $CurrentVersion, $LatestVersion + $Message = $NotifLocale.local.outputs.output[2].message -f $CurrentVersion, $LatestVersion.Replace("v","") $MessageType = "info" $Balise = "Winget-AutoUpdate" Start-NotifTask $Title $Message $MessageType $Balise @@ -281,7 +281,7 @@ function Update-WAU{ #Download the zip Write-Log "Starting downloading the GitHub Repository" - Invoke-RestMethod -Uri "$($WAUurl)/zipball/$($LatestVersion)" -OutFile $ZipFile + Invoke-RestMethod -Uri "https://api.github.com/repos/Romanitho/Winget-AutoUpdate/zipball/$($LatestVersion)" -OutFile $ZipFile Write-Log 'Download finished' #Extract Zip File @@ -290,8 +290,8 @@ function Update-WAU{ Expand-Archive -Path $ZipFile -DestinationPath $location -Force Get-ChildItem -Path $location -Recurse | Unblock-File Write-Log "Unzip finished" - $TempPath = Resolve-Path "$location\Romanitho-Winget-AutoUpdate*\Winget-AutoUpdate\" - Copy-Item -Path "$TempPath\*" -Destination ".\" -Recurse -Force + $TempPath = (Resolve-Path "$location\Romanitho-Winget-AutoUpdate*\Winget-AutoUpdate\").Path + Copy-Item -Path "$TempPath\*" -Destination "$WorkingDir\" -Recurse -Force #Remove update zip file Write-Log "Cleaning temp files"