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

Fix is_pe declaration so it works without is_pe #123

Merged
merged 2 commits into from
Mar 5, 2014

Conversation

kbarber
Copy link
Contributor

@kbarber kbarber commented Feb 27, 2014

Signed-off-by: Ken Barber ken@bob.sh

Signed-off-by: Ken Barber <ken@bob.sh>
@juanbrein
Copy link

Please take a look at #124 first.

Because facter likes to convert booleans to strings

Signed-off-by: Ken Barber <ken@bob.sh>
@wleese
Copy link

wleese commented Mar 5, 2014

Has a different fix been committed anywhere?

@kbarber
Copy link
Contributor Author

kbarber commented Mar 5, 2014

@wleese. No, but at the same time the is_pe bug has never actually published either. If you're working against master, then you do so at your own risk sorry :-). Pin to a released tag or use the forge version if you want stability.

@wleese
Copy link

wleese commented Mar 5, 2014

Good point, thanks.

@kbarber
Copy link
Contributor Author

kbarber commented Mar 5, 2014

@senior can you review this one when you get a chance? Thanks :-).

kbarber added a commit that referenced this pull request Mar 5, 2014
Fix is_pe declaration so it works without is_pe
@kbarber kbarber merged commit 5ad2a6d into puppetlabs:master Mar 5, 2014
@raphink
Copy link

raphink commented Mar 5, 2014

As stated in #122, I think str2bool($::is_pe) would be more elegant than testing against the 'true' string.

@kbarber
Copy link
Contributor Author

kbarber commented Mar 5, 2014

@raphink I just don't like the undef behaviour of str2bool:

# puppet apply -e 'str2bool($::foo)'
Error: Function 'str2bool' must be the value of a statement at line 1 on node puppetdb1.vm

@raphink
Copy link

raphink commented Mar 5, 2014

Interesting.

@kbarber
Copy link
Contributor Author

kbarber commented Mar 5, 2014

@raphink sorry just woke up, I'm totally wrong wrong wrong :-).

@kbarber
Copy link
Contributor Author

kbarber commented Mar 5, 2014

@raphink

# puppet apply -e 'notice(str2bool($::foo))'
Notice: Scope(Class[main]): false

Its fine ... this is such a trivially annoying issue, I'm not sure how much I care. Throw a patch if you like :-).

@smortex smortex added the bugfix label Apr 18, 2024
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.

5 participants