class ChefCLI::Command::GeneratorCommands::Cookbook

def read_and_validate_params

def read_and_validate_params
  arguments = parse_options(params)
  @cookbook_name_or_path = arguments[0]
  if !@cookbook_name_or_path
    @params_valid = false
  elsif /-/ =~ File.basename(@cookbook_name_or_path)
    msg("Hyphens are discouraged in cookbook names as they may cause problems with custom resources. See https://docs.chef.io/ctl_chef.html#chef-generate-cookbook for more information.")
  end
  if config[:berks] && config[:policy]
    err("Berkshelf and Policyfiles are mutually exclusive. Please specify only one.")
    @params_valid = false
  end
  if config[:berks]
    @policy_mode = false
  end
  if config[:verbose]
    @verbose = true
  end
  true
end