Skip to content

Fix is_pe declaration so it works without is_pe#123

Merged
kbarber merged 2 commits into
puppetlabs:masterfrom
kbarber:maint/master/fix_is_pe
Mar 5, 2014
Merged

Fix is_pe declaration so it works without is_pe#123
kbarber merged 2 commits into
puppetlabs:masterfrom
kbarber:maint/master/fix_is_pe

Conversation

@kbarber

@kbarber kbarber commented Feb 27, 2014

Copy link
Copy Markdown
Contributor

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

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

Copy link
Copy Markdown

Please take a look at #124 first.

Because facter likes to convert booleans to strings

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

wleese commented Mar 5, 2014

Copy link
Copy Markdown

Has a different fix been committed anywhere?

@kbarber

kbarber commented Mar 5, 2014

Copy link
Copy Markdown
Contributor Author

@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

wleese commented Mar 5, 2014

Copy link
Copy Markdown

Good point, thanks.

@kbarber

kbarber commented Mar 5, 2014

Copy link
Copy Markdown
Contributor Author

@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

raphink commented Mar 5, 2014

Copy link
Copy Markdown

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

@kbarber

kbarber commented Mar 5, 2014

Copy link
Copy Markdown
Contributor Author

@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

raphink commented Mar 5, 2014

Copy link
Copy Markdown

Interesting.

@kbarber

kbarber commented Mar 5, 2014

Copy link
Copy Markdown
Contributor Author

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

@kbarber

kbarber commented Mar 5, 2014

Copy link
Copy Markdown
Contributor Author

@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