diff options
author | pixdrift <support@pixeldrift.net> | 2018-09-24 06:48:10 +1000 |
---|---|---|
committer | pixdrift <support@pixeldrift.net> | 2018-09-24 06:48:10 +1000 |
commit | 6150fdea14946067da2964819b861b6870b60e3e (patch) | |
tree | 412940b17166dcfe4325159e93f3c45951de9f0d /lib | |
parent | 2daf2d47aad38b8f8ddfdce47868ca7d95ea0949 (diff) | |
download | chef-6150fdea14946067da2964819b861b6870b60e3e.tar.gz |
Add RHEL 8 platform-python to python binary search list in DNF for package resource
Signed-off-by: pixdrift <support@pixeldrift.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/provider/package/dnf/python_helper.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/provider/package/dnf/python_helper.rb b/lib/chef/provider/package/dnf/python_helper.rb index b3593f6efd..56706764d0 100644 --- a/lib/chef/provider/package/dnf/python_helper.rb +++ b/lib/chef/provider/package/dnf/python_helper.rb @@ -37,7 +37,8 @@ class Chef DNF_HELPER = ::File.expand_path(::File.join(::File.dirname(__FILE__), "dnf_helper.py")).freeze def dnf_command - @dnf_command ||= which("python", "python3", "python2", "python2.7") do |f| + # platform-python is used for system tools on RHEL 8 and is installed under /usr/libexec + @dnf_command ||= which("platform-python", "python", "python3", "python2", "python2.7", extra_path: "/usr/libexec") do |f| shell_out("#{f} -c 'import dnf'").exitstatus == 0 end + " #{DNF_HELPER}" end |