[Bug] Function Update-ManifestProperty
rewrites fields in autoupdate
if it is a PSCustomObject
#5933
Labels
Update-ManifestProperty
rewrites fields in autoupdate
if it is a PSCustomObject
#5933
Bug Report
Current Behavior
I'll use a sample manifest to illustrate the issue. I have modified
sudo.json
in main bucket as following:I have add
env_set
andautoupdate.env_set
, as well as change the current version to0.1
. Then runAs a result,
SUDO_VERSION
in bothenv_set
andautoupdate.env_set
were changed to0.2020.01.26
.Expected Behavior
Only
SUDO_VERSION
underenv_set
will be updated, and the value underautoupdate.env_set
should keep the substitution pattern.Possible Solution
The assignment operation for PSCustomObject only passes by reference, a copy operation can fix it.
System details
Windows version: 10
OS architecture: 64bit
PowerShell version: 5.1.20348.2400
The text was updated successfully, but these errors were encountered: