in chefctl/src/chefctl.rb [950:985]
def get_chef_cmd
chef_args = []
if Chefctl::Config.trace
chef_args += %w{-l trace}
elsif Chefctl::Config.debug
chef_args += %w{-l debug}
end
if Chefctl::Config.human || Chefctl::Config.whyrun
chef_args += %w{-l fatal -F doc}
else
chef_args << '--force-logger'
end
chef_args << '--why-run' if Chefctl::Config.whyrun
chef_args << '--no-color' unless Chefctl::Config.color
chef_args += Chefctl::Config.chef_options
if Chefctl::Config.chef_client.is_a?(Array)
cmd = Chefctl::Config.chef_client + chef_args
else
cmd = [
Chefctl::Config.chef_client,
] + chef_args
end
Chefctl.logger.debug("Running: #{cmd.inspect}")
cmd
end