fun main()

in cli/src/main/kotlin/org/jetbrains/intellij/pluginRepository/client.kt [12:28]


    fun main(args: Array<String>) {
      if (args.isEmpty()) {
        System.err.println("Command is not specified: `upload`, `download`, `list` or `info` commands are supported.")
        exitProcess(1)
      }
      val command = args[0]
      val restParameters = args.copyOfRange(1, args.size)
      when (command) {
        "upload" -> upload(restParameters)
        "download" -> exitProcess(if (download(restParameters) != null) 0 else 1)
        "info" -> info(restParameters)
        else -> {
          System.err.println("Unknown command `$command`: `upload`, `download`, `list` or `info` commands are supported.")
          exitProcess(1)
        }
      }
    }