class ChefDK::Command::Exec

Public Instance Methods

needs_help?(params) click to toggle source
# File lib/chef-dk/command/exec.rb, line 40
def needs_help?(params)
  ["-h", "--help"].include? params[0]
end
needs_version?(params) click to toggle source
# File lib/chef-dk/command/exec.rb, line 35
def needs_version?(params)
  # Force version to get passed down to command
  false
end
run(params) click to toggle source
# File lib/chef-dk/command/exec.rb, line 27
def run(params)
  # Set ENV directly on the "parent" process (us) before running #exec to
  # ensure the custom PATH is honored when finding the command to exec
  omnibus_env.each { |var, value| ENV[var] = value }
  exec(*params)
  raise "Exec failed without an exception, your ruby is buggy" # should never get here
end