All Downloads are FREE. Search and download functionalities are using the official Maven repository.

coursier.cli.util.Guard.scala Maven / Gradle / Ivy

There is a newer version: 2.1.13
Show newest version
package coursier.cli.util

object Guard {
  def apply(): Unit = {
    val experimental =
      sys.env.get("COURSIER_EXPERIMENTAL").exists(s => s == "1" || s == "true") ||
        java.lang.Boolean.getBoolean("coursier.experimental")
    if (!experimental) {
      System.err.println(
        "Command disabled. Set environment variable COURSIER_EXPERIMENTAL=1, " +
          "or Java property coursier.experimental=true."
      )
      sys.exit(1)
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy