lib/puppet-check/puppet_parser.rb in puppet-check-1.2.0 vs lib/puppet-check/puppet_parser.rb in puppet-check-1.2.1

- old
+ new

@@ -22,11 +22,11 @@ # this is the actual error that we need to rescue Puppet::Face from rescue SystemExit next PuppetCheck.error_files.push("-- #{file}:\n#{errors.map(&:to_s).join("\n").gsub("#{File.absolute_path(file)}:", '')}") end - # initialize warnings with output from the parser if it exists since they are warnings if they did not trigger a SystemExit + # initialize warnings with output from the parser if it exists, since the output is warnings if Puppet::Face did not trigger a SystemExit warnings = errors.empty? ? "-- #{file}:" : "-- #{file}:\n#{errors.map(&:to_s).join("\n").gsub("#{File.absolute_path(file)}:", '')}" Puppet::Util::Log.close_all # check puppet style if PuppetCheck.style_check @@ -35,10 +35,10 @@ # check for invalid arguments to PuppetLint begin PuppetLint::OptParser.build.parse!(PuppetCheck.puppetlint_args) rescue OptionParser::InvalidOption - raise 'puppet-lint: invalid option' + raise "puppet-lint: invalid option supplied among #{PuppetCheck.puppetlint_args}" end # prepare the PuppetLint object for style checks puppet_lint = PuppetLint.new puppet_lint.file = file