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

Don't fail if first element of is not an hash before flattening #1555

Merged
merged 1 commit into from Dec 12, 2016

Conversation

sathieu
Copy link
Contributor

@sathieu sathieu commented Nov 22, 2016

The template is using [@rewrites].flatten.compact which maps to Puppet's delete_undef_values(flatten([]))

@sathieu sathieu force-pushed the rewrites_nofail branch 2 times, most recently from 4222c50 to 7047f5c Compare November 22, 2016 10:40
@eputnam
Copy link
Contributor

eputnam commented Nov 28, 2016

@sathieu thanks for the PR! In what situation would the first element not be a hash?

@sathieu
Copy link
Contributor Author

sathieu commented Nov 30, 2016

@eputnam : When the directives param is made from several variables (like [$a, $b,$c]), and some of them are undef, of an array

@hunner
Copy link
Contributor

hunner commented Dec 2, 2016

Looks like delete_undef_values was added to stdlib in 4.2.0, so could you bump the lower bound in metadata.json for that? I think no one uses stdlib 2 or 3 any more that would also use a modern apache version, so we'll call it a bugfix.

The template is using [@rewrites].flatten.compact which maps to Puppet's delete_undef_values(flatten([]))

Bump stdlib version to the one introducing `delete_undef_values'.
@bmjen bmjen merged commit 65ee137 into puppetlabs:master Dec 12, 2016
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.

None yet

4 participants