bolt-modules/boltlib/lib/puppet/functions/run_command.rb in bolt-1.19.0 vs bolt-modules/boltlib/lib/puppet/functions/run_command.rb in bolt-1.20.0

- old
+ new

@@ -47,16 +47,11 @@ .from_issue_and_stack(Bolt::PAL::Issues::PLAN_OPERATION_NOT_SUPPORTED_WHEN_COMPILING, action: 'run_command') end options ||= {} options = options.merge('_description' => description) if description - executor = Puppet.lookup(:bolt_executor) { nil } - inventory = Puppet.lookup(:bolt_inventory) { nil } - unless executor && inventory && Puppet.features.bolt? - raise Puppet::ParseErrorWithIssue.from_issue_and_stack( - Puppet::Pops::Issues::TASK_MISSING_BOLT, action: _('run a command') - ) - end + executor = Puppet.lookup(:bolt_executor) + inventory = Puppet.lookup(:bolt_inventory) executor.report_function_call('run_command') # Ensure that given targets are all Target instances targets = inventory.get_targets(targets)