Skip to content

Commit

Permalink
cookstyle linting fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Corey Hemminger <hemminger@hotmail.com>
  • Loading branch information
Stromweld committed Feb 5, 2025
1 parent ba368a3 commit a003157
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions lib/kitchen/provisioner/chef_apply.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ class ChefApply < ChefBase
plugin_version Kitchen::VERSION

default_config :chef_apply_path do |provisioner|
provisioner
.remote_path_join(%W{#{chef_bin_path} chef-apply})
.tap { |path| path.concat(".bat") if provisioner.windows_os? }
provisioner.remote_path_join(%W{#{chef_bin_path} chef-apply}).tap { |path| path.concat(".bat") if provisioner.windows_os? }
end

default_config :apply_path do |provisioner|
Expand Down
6 changes: 3 additions & 3 deletions lib/kitchen/provisioner/chef_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -737,16 +737,16 @@ def wrapped_chef_cmd(base_cmd, configfile, append: "")

# Determine chef binaries location
def chef_bin_path
require_relative '../which'
require_relative '../shell_out'
require_relative "../which"
require_relative "../shell_out"
include ShellOut
include Which

# Check for binlinked chef-client binary and use that first
# If no binlinked chef-client binary is found then check for habiatat installed chef-client
# If no habitat installed chef-client is found then check for omnibus installed chef-client
# all fails raise an error
if which('chef-client')
if which("chef-client")
windows_os? ? File.dirname(which("chef-client")) : File.dirname(File.readlink(which("chef-client")))
elsif File.exist?(config[:hab_binary]) && ShellOut.run_command("#{config[:hab_binary]} pkg list chef/chef-infra-client").include?("chef/chef-infra-client")
remote_path_join(%W{#{ShellOut.run_command("#{config[:hab_binary]} pkg path chef/chef-infra-client").split("\n").first} bin})
Expand Down

0 comments on commit a003157

Please sign in to comment.