bolt-modules/boltlib/lib/puppet/functions/fail_plan.rb in bolt-1.19.0 vs bolt-modules/boltlib/lib/puppet/functions/fail_plan.rb in bolt-1.20.0
- old
+ new
@@ -37,11 +37,11 @@
unless Puppet[:tasks]
raise Puppet::ParseErrorWithIssue
.from_issue_and_stack(Bolt::PAL::Issues::PLAN_OPERATION_NOT_SUPPORTED_WHEN_COMPILING, action: 'fail_plan')
end
- executor = Puppet.lookup(:bolt_executor) { nil }
- executor&.report_function_call('fail_plan')
+ executor = Puppet.lookup(:bolt_executor)
+ executor.report_function_call('fail_plan')
raise Bolt::PlanFailure.new(msg, kind || 'bolt/plan-failure', details, issue_code)
end
def from_error(err)