guard-puppet-lint
guard-puppet-lint copied to clipboard
notifications of failing parser do not work
Hi!
I just created a small fix that allows to send notifications of a not compiling catalog for Puppet 3.0.1. You need to add the redirection of stderr to stdout and adapt your string to strip out the "Error: ..." message.
if options[:syntax_check]
parser_messages = `puppet parser validate #{file} --color=false 2>&1`.split("\n")
parser_messages.reject! { |s| s =~ /puppet help parser validate/ }
parser_messages.map! { |s| s.gsub 'Error: Could not parse for environment production:', '' }
messages += prepend_filename(parser_messages, file)
end
Best Regards,
Daniel
Can you make a pull request for me to merge?