Fixed issue

pull/20/head
Romain 2022-03-07 03:28:16 +01:00 committed by GitHub
parent 441eed57d0
commit 65cacd0d19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -268,7 +268,7 @@ function Update-WAU{
#Send available update notification #Send available update notification
$Title = $NotifLocale.local.outputs.output[2].title -f "Winget-AutoUpdate" $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" $MessageType = "info"
$Balise = "Winget-AutoUpdate" $Balise = "Winget-AutoUpdate"
Start-NotifTask $Title $Message $MessageType $Balise Start-NotifTask $Title $Message $MessageType $Balise
@ -281,7 +281,7 @@ function Update-WAU{
#Download the zip #Download the zip
Write-Log "Starting downloading the GitHub Repository" 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' Write-Log 'Download finished'
#Extract Zip File #Extract Zip File
@ -290,8 +290,8 @@ function Update-WAU{
Expand-Archive -Path $ZipFile -DestinationPath $location -Force Expand-Archive -Path $ZipFile -DestinationPath $location -Force
Get-ChildItem -Path $location -Recurse | Unblock-File Get-ChildItem -Path $location -Recurse | Unblock-File
Write-Log "Unzip finished" Write-Log "Unzip finished"
$TempPath = Resolve-Path "$location\Romanitho-Winget-AutoUpdate*\Winget-AutoUpdate\" $TempPath = (Resolve-Path "$location\Romanitho-Winget-AutoUpdate*\Winget-AutoUpdate\").Path
Copy-Item -Path "$TempPath\*" -Destination ".\" -Recurse -Force Copy-Item -Path "$TempPath\*" -Destination "$WorkingDir\" -Recurse -Force
#Remove update zip file #Remove update zip file
Write-Log "Cleaning temp files" Write-Log "Cleaning temp files"