lib/bolt/plugin/task.rb in bolt-1.34.0 vs lib/bolt/plugin/task.rb in bolt-1.35.0

- old
+ new

@@ -46,10 +46,14 @@ result['value'] end def puppet_library(opts, target, apply_prep) params = opts['parameters'] || {} - task = apply_prep.get_task(opts['task'], params) + begin + task = apply_prep.get_task(opts['task'], params) + rescue Bolt::Error => e + raise Bolt::Plugin::PluginError::ExecutionError.new(e.message, name, 'puppet_library') + end proc do apply_prep.run_task([target], task, params).first end end end