language-puppet icon indicating copy to clipboard operation
language-puppet copied to clipboard

Check for empty string (false if undef or "")

Open PierreR opened this issue 8 years ago • 2 comments

Apparently the idiomatic way to check if a string is non-empty in puppet 4 would be :

    if $facts['subgroup'] =~ String[1] {

It does work in puppet4 but is not supported in language-puppet. Could language-puppet supports such idiosyncrasy or do you have a better idea ?

Cheers,

PierreR avatar Jul 28 '17 20:07 PierreR

I will use empty from stdlib. I will re-open this issue if I encounter such usage in an external module.

PierreR avatar Jul 28 '17 21:07 PierreR

I can implement that though.

bartavelle avatar Jul 30 '17 18:07 bartavelle