Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/facter/custom_facts/core/execution/posix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Facter
module Core
module Execution
class Posix < Facter::Core::Execution::Base
DEFAULT_SEARCH_PATHS = ['/sbin', '/usr/sbin'].freeze
DEFAULT_SEARCH_PATHS = ['/sbin', '/usr/sbin', '/opt/puppetlabs/bin'].freeze

def search_paths
# Make sure custom_facts is usable even for non-root users. Most commands
Expand Down
2 changes: 1 addition & 1 deletion spec/custom_facts/core/execution/posix_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
describe '#search_paths' do
it 'uses the PATH environment variable plus /sbin and /usr/sbin on unix' do
allow(ENV).to receive(:[]).with('PATH').and_return '/bin:/usr/bin'
expect(posix_executor.search_paths).to eq %w[/bin /usr/bin /sbin /usr/sbin]
expect(posix_executor.search_paths).to eq %w[/bin /usr/bin /sbin /usr/sbin /opt/puppetlabs/bin]
end
end

Expand Down
Loading