diff --git a/lib/facter/custom_facts/core/execution.rb b/lib/facter/custom_facts/core/execution.rb index 9c61b460c..4dfb9c993 100644 --- a/lib/facter/custom_facts/core/execution.rb +++ b/lib/facter/custom_facts/core/execution.rb @@ -87,19 +87,6 @@ def with_env(values, &block) @@impl.with_env(values, &block) end - # Try to execute a command and return the output. - # - # @param command [String] Command to run - # - # @return [String/nil] Output of the program, or nil if the command does - # not exist or could not be executed. - # - # @deprecated Use #{execute} instead - # @api public - def exec(command) - @@impl.execute(command, on_fail: nil) - end - # Execute a command and return the output of that program. # # @param command [String] Command to run diff --git a/spec/custom_facts/core/execution_spec.rb b/spec/custom_facts/core/execution_spec.rb index 4f18df89d..66ad1117f 100644 --- a/spec/custom_facts/core/execution_spec.rb +++ b/spec/custom_facts/core/execution_spec.rb @@ -36,11 +36,6 @@ execution.expand_command('waffles') end - it 'delegates #exec to #execute' do - expect(impl).to receive(:execute).with('waffles', { on_fail: nil }) - execution.exec('waffles') - end - it 'delegates #execute to the implementation' do expect(impl).to receive(:execute).with('waffles', {}) execution.execute('waffles')