From 28eb1d3b9cca720912d0db0421f9bdf9c5f453e1 Mon Sep 17 00:00:00 2001 From: Steven Pritchard Date: Mon, 13 Apr 2026 19:16:45 +0000 Subject: [PATCH] Remove deprecated Facter::Core::Execution.exec exec was deprecated in favor of execute. This commit completes the removal per the OpenVox Platform Deprecation Schedule (issue #88). Co-Authored-By: Claude Sonnet 4.6 Signed-off-by: Steven Pritchard --- lib/facter/custom_facts/core/execution.rb | 13 ------------- spec/custom_facts/core/execution_spec.rb | 5 ----- 2 files changed, 18 deletions(-) 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')