Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fix fail message #248

merged 3 commits into from Mar 7, 2014


None yet
3 participants

the fail message was including a fact that was not used in the whole case statement and caused some confusion.

@electrical electrical Fix fail message
the fail message was including a fact that was not used in the whole case statement and caused some confusion.

daenney commented Feb 26, 2014

I'm gonna be the annoying community person that's too involved in this but knowing what kind of spec hero you are, could you add a test for that failure message just to prevent someone from bringing the issue back?


daenney commented Feb 27, 2014

This is good, should merge. @hunner @apenney


hunner commented Feb 28, 2014

The reason I added $::osfamily even though it's not in the case statement is that if the module is applied to something without $::lsbdistid like Windows (yeah, I know...) then the error message would be less helpful without it.

@hunner ahh okay. kinda makes sense. will close PR then,

@electrical electrical closed this Feb 28, 2014


daenney commented Feb 28, 2014

I don't agree with the rationale. @electrical's error message was much better than with the osfamily because the osfamily can obscure the actual error.

Since this module won't ever make any sense on any platform but Debian it should have code in it that bails it out:

if $::osfamily != Debian {
  fail('This module only works on Debian or derivatives like Ubuntu')

Now the user knows exactly why it's blowing up and the other error messages in params.pp can reflect the actual cause if it is running on a supported distro.


hunner commented Feb 28, 2014

++ to that! :) Want to update the PR @electrical ?

@hunner hunner reopened this Feb 28, 2014


hunner commented Feb 28, 2014

Also, spec/acceptance/unsupported_spec.rb will have to be updated for that error message.

@hunner will do. Will have a PR after the weekend.


daenney commented Mar 5, 2014

@electrical Pwetty please? 😄

Will try to spend some time on it tomorrow :-)

Working on it today. sorry for the delay


daenney commented Mar 7, 2014

@hunner Take it away!

@hunner hunner added a commit that referenced this pull request Mar 7, 2014

@hunner hunner Merge pull request #248 from electrical/fix_params_fail
Fix fail message

@hunner hunner merged commit 6691c2f into puppetlabs:master Mar 7, 2014

1 check passed

default The Travis CI build passed

@electrical electrical deleted the electrical:fix_params_fail branch Mar 7, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment