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

Check for variations of $is_pe #97

Merged
merged 1 commit into from
Nov 20, 2014
Merged

Check for variations of $is_pe #97

merged 1 commit into from
Nov 20, 2014

Conversation

zachfi
Copy link
Contributor

@zachfi zachfi commented Nov 20, 2014

On recent versions of facter, we need to check for a boolean value, but
to support older versions of Facter, we need to check for a string.

On recent versions of facter, we need to check for a boolean value, but
to support older versions of Facter, we need to check for a string.
@elyscape
Copy link
Contributor

Potentially superior alternative:

if $::is_pe == true || str2bool($::is_pe) == true:

This would also solve the issue of linting frowning on the quoted 'true'.

@zachfi
Copy link
Contributor Author

zachfi commented Nov 20, 2014

I'd argue that lint is complaining about an invalid check, since all facts in older versions of facter are strings and thus to do a comparisons you will sometimes have the word 'true' or 'false' in a string. I can change if its preferred. I don't really care.

@elyscape
Copy link
Contributor

That's certainly fair. @acidprime, your thoughts?

@acidprime
Copy link
Collaborator

merging for right now as this effects anyone using the future parser

acidprime added a commit that referenced this pull request Nov 20, 2014
Check for variations of $is_pe
@acidprime acidprime merged commit 5508a24 into voxpupuli:master Nov 20, 2014
@zachfi zachfi deleted the morepe branch November 20, 2014 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants