Method: Bolt::PAL::YamlPlan::Transpiler#validate_plan

Defined in:
lib/bolt/pal/yaml_plan/transpiler.rb

#validate_plan(plan) ⇒ Object



68
69
70
71
72
73
# File 'lib/bolt/pal/yaml_plan/transpiler.rb', line 68

def validate_plan(plan)
  Puppet::Pops::Parser::EvaluatingParser.new.parse_string(plan)
rescue Puppet::Error => e
  $stderr.puts "The converted puppet plan contains invalid puppet code: #{e.message}"
  exit 1
end