Skip to content

Commit

Permalink
Merge pull request #20 from Romanitho/Romanitho-patch-1
Browse files Browse the repository at this point in the history
Fixed issue
  • Loading branch information
Romanitho authored Mar 7, 2022
2 parents 441eed5 + 65cacd0 commit 50399cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Winget-AutoUpdate/winget-upgrade.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit 50399cd

Please sign in to comment.