# class Chef::Knife::EnvironmentCreate

### Public Instance Methods

run() click to toggle source

    # File lib/chef/knife/environment_create.rb, line 37
    def run
      env_name = @name_args[0]

      if env_name.nil?
        show_usage
        ui.fatal("You must specify an environment name")
        exit 1
      end

      env = Chef::Environment.new
      env.name(env_name)
      env.description(config[:description]) if config[:description]
      create_object(env)
    end