Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(MAINT) Correctly canonicalize enumerable values in dsc #92

Merged
merged 1 commit into from
Feb 1, 2021
Merged

(MAINT) Correctly canonicalize enumerable values in dsc #92

merged 1 commit into from
Feb 1, 2021

Conversation

michaeltlombardi
Copy link
Contributor

@michaeltlombardi michaeltlombardi commented Jan 30, 2021

Prior to this commit the comparison in the DSC base provider for values on the node vs values in the manifest was a simple equals check; this works for non-enumerables and for enumerables so long as the enumerables are in the same order.

This commit corrects the check to sort the enumerables so that the comparison is done purely on the values, not the order, as PowerShell does not care about the order of items in a hash or array.

Prior to this commit the comparison in the DSC base provider for
values on the node vs values in the manifest was a simple equals
check; this works for non-enumerables and for enumerables *so long
as* the enumerables are in the same order.

This commit corrects the check to sort the enumerables so that the
comparison is done purely on the values, not the order, as PowerShell
does not care about the order of items in a hash or array.
@pmcmaw pmcmaw merged commit 4753b16 into puppetlabs:main Feb 1, 2021
@michaeltlombardi michaeltlombardi deleted the maint/main/fix-enumerable-canonicalization branch February 1, 2021 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants