bolt-modules/boltlib/lib/puppet/functions/set_feature.rb in bolt-1.19.0 vs bolt-modules/boltlib/lib/puppet/functions/set_feature.rb in bolt-1.20.0
- old
+ new
@@ -28,19 +28,12 @@
unless Puppet[:tasks]
raise Puppet::ParseErrorWithIssue
.from_issue_and_stack(Bolt::PAL::Issues::PLAN_OPERATION_NOT_SUPPORTED_WHEN_COMPILING, action: 'set_feature')
end
- inventory = Puppet.lookup(:bolt_inventory) { nil }
-
- unless inventory
- raise Puppet::ParseErrorWithIssue.from_issue_and_stack(
- Puppet::Pops::Issues::TASK_MISSING_BOLT, action: _('set feature')
- )
- end
-
- executor = Puppet.lookup(:bolt_executor) { nil }
- executor&.report_function_call('set_feature')
+ inventory = Puppet.lookup(:bolt_inventory)
+ executor = Puppet.lookup(:bolt_executor)
+ executor.report_function_call('set_feature')
inventory.set_feature(target, feature, value)
target
end