Skip to content

Commit

Permalink
fix(autoupdate): Wrong object passed
Browse files Browse the repository at this point in the history
  • Loading branch information
Ash258 committed Apr 3, 2021
1 parent 3e1a1ed commit f84f2fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/autoupdate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ function Invoke-Autoupdate ([String] $app, $dir, $json, [String] $version, [Hash
Write-UserMessage -Message "Autoupdating $app" -Color 'DarkCyan'

$oldVersion = $json.version
$oldJson = $json.PSObject.Copy()
$has_changes = $false
$has_errors = $false
[bool] $valid = $true
Expand Down Expand Up @@ -429,7 +430,6 @@ function Invoke-Autoupdate ([String] $app, $dir, $json, [String] $version, [Hash
if ($has_changes -and !$has_errors) {
# Archive older version
if (!$IgnoreArchive -and ($json.autoupdate.archive -and ($json.autoupdate.archive -eq $true))) {
$oldJson = $json.PSObject.Copy()
$appOldPath = Join-Path $dir "old\$app"
$manifestOldPath = Join-Path $appOldPath "${oldVersion}${Extension}"

Expand Down

0 comments on commit f84f2fe

Please sign in to comment.