Skip to content

Commit

Permalink
fix(autoupdate): Copy PSCustomObject-type properties within `autoup…
Browse files Browse the repository at this point in the history
…date` to prevent reference changes (ScoopInstaller#5934)
  • Loading branch information
amorphobia authored and brian6932 committed Jun 1, 2024
1 parent 039973b commit e1e44a4
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 @@ -365,7 +365,7 @@ function Update-ManifestProperty {
}
} elseif ($Manifest.$currentProperty -and $Manifest.autoupdate.$currentProperty) {
# Update other property (global)
$autoupdateProperty = $Manifest.autoupdate.$currentProperty
$autoupdateProperty = $Manifest.autoupdate.$currentProperty.PSObject.Copy()
$newValue = substitute $autoupdateProperty $Substitutions
if (($autoupdateProperty.GetType().Name -eq 'Object[]') -and ($autoupdateProperty.Length -eq 1)) {
# Make sure it's an array
Expand Down

0 comments on commit e1e44a4

Please sign in to comment.