Skip to content

Treat $version as an integer for comparison, defaults to string #1135

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

Merged
merged 1 commit into from
Feb 3, 2020

Conversation

boydtom
Copy link
Contributor

@boydtom boydtom commented Jan 29, 2020

When setting password_encryption an operator AND calls a comparison of the $version variable to an integer. $version is a string - breaking the comparison. This should fix that - although it may not be the best way to do so and someone with greater skill has a better method.

@boydtom boydtom requested a review from a team as a code owner January 29, 2020 21:00
Copy link
Contributor

@sanfrancrisko sanfrancrisko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @boydtom! Thanks for highlighting this issue and submitting this change request. @DavidS made me aware of the versioncmp function that might be able to achieve what you're looking to do. I've left an example in the PR, if you wouldn't mind having a look and making the change if you're happy? We should be good to merge after that.

Thanks again!

@sanfrancrisko
Copy link
Contributor

LGTM @boydtom - thanks again for the fix! 👍

@sanfrancrisko sanfrancrisko merged commit 2c85ed3 into puppetlabs:master Feb 3, 2020
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