    # File lib/chef/knife/cookbook_download.rb, line 118
          def ask_which_version
            question = "Which version do you want to download?\n"
            valid_responses = {}
            available_versions.each_with_index do |version, index|
              valid_responses[(index + 1).to_s] = version
              question << "#{index + 1}. #{@cookbook_name} #{version}\n"
            end
            question += "\n"
            response = ask_question(question).strip

            unless @version = valid_responses[response]
              ui.error("'#{response}' is not a valid value.")
              exit(1)
            end
            @version
          end