class Chef::Knife::HelperExec

Public Instance Methods

run() click to toggle source
# File lib/chef/knife/helper_exec.rb, line 24
def run
  conf = ::Knife::Helper::Config.new(config[:file])
  commands = ::Knife::Helper::Commands.new(
    conf.settings['command_base'],
    conf.commands,
    conf.option_sets
  )
  @name_args.each do |cmd|
    if config[:print_command]
      output commands.build(cmd)
    else
      commands.exec(cmd)
    end
  end
end