Issue #20893 has been updated by Arnoud de Jonge. Status changed from Investigating to In Topic Branch Pending Review Branch set to https://github.com/puppetlabs/facter/pull/483
---------------------------------------- Bug #20893: Empty output from facts.d scripts crashes facter https://projects.puppetlabs.com/issues/20893#change-94532 * Author: Paul Tötterman * Status: In Topic Branch Pending Review * Priority: Normal * Assignee: Arnoud de Jonge * Category: * Target version: * Keywords: * Branch: https://github.com/puppetlabs/facter/pull/483 * Affected Facter version: 1.7.1 ---------------------------------------- Reproduce by placing a script that doesn't output anything to /etc/facter/facts.d: cd /etc/facter/facts.d && echo "#!/bin/sh" > bad.sh && chmod +x bad.sh After this facter will crash with: Error: undefined method `each_line' for nil:NilClass The facts.d support from stdlib did not crash on empty output. Also incorrect output keeps facter from crashing: #!/bin/sh echo invalid output -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
