From de5867b78db666bd02c17ee157279e8918404b17 Mon Sep 17 00:00:00 2001 From: Hsiao-nan Cheung Date: Mon, 13 May 2024 13:46:59 +0800 Subject: [PATCH] fix(core): Add 'PSObject.Copy()' to 'substitute()' (#5962) --- lib/autoupdate.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/autoupdate.ps1 b/lib/autoupdate.ps1 index 705c767451..bd24e04015 100644 --- a/lib/autoupdate.ps1 +++ b/lib/autoupdate.ps1 @@ -365,7 +365,7 @@ function Update-ManifestProperty { } } elseif ($Manifest.$currentProperty -and $Manifest.autoupdate.$currentProperty) { # Update other property (global) - $autoupdateProperty = $Manifest.autoupdate.$currentProperty.PSObject.Copy() + $autoupdateProperty = $Manifest.autoupdate.$currentProperty $newValue = substitute $autoupdateProperty $Substitutions if (($autoupdateProperty.GetType().Name -eq 'Object[]') -and ($autoupdateProperty.Length -eq 1)) { # Make sure it's an array