class Chef::Knife::ConfigUseProfile

Public Instance Methods

run() click to toggle source
Calls superclass method Chef::Knife::ConfigUse#run
# File lib/chef/knife/config_use_profile.rb, line 31
def run
  Chef::Log.warn("knife config use-profile has been deprecated in favor of knife config use. This will be removed in the major release version!")

  credentials_data = self.class.config_loader.parse_credentials_file
  context_file = ChefConfig::PathHelper.home(".chef", "context").freeze
  profile = @name_args[0]&.strip
  if profile.nil? || profile.empty?
    show_usage
    ui.fatal("You must specify a profile")
    exit 1
  end

  super
end