Skip to content

Commit

Permalink
Support puppet 6.5
Browse files Browse the repository at this point in the history
Longer term, it'd be better to use a public interface, but for now, code
for the changes to the private `validate_manifest` method made in
puppetlabs/puppet#6909

See https://tickets.puppetlabs.com/browse/PUP-8984
  • Loading branch information
alexjfisher committed Jul 6, 2019
1 parent eb15922 commit d9fa22f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/puppet-syntax/manifests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,13 @@ def check(filelist)
filelist.each do |puppet_file|
Puppet::Test::TestHelper.before_each_test
begin
validate_manifest(puppet_file)
error = validate_manifest(puppet_file)
if error.is_a?(Hash) # Puppet 6.5.0 onwards
output << error.values.first unless error.empty?
end
rescue SystemExit
# Disregard exit(1) from face.
# This is how puppet < 6.5.0 `validate_manifest` worked.
rescue => error
output << error
ensure
Expand Down

0 comments on commit d9fa22f

Please sign in to comment.