
com.mchange.sysadmin.taskrunner.Env.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mchange-sysadmin-scala_3 Show documentation
Show all versions of mchange-sysadmin-scala_3 Show documentation
A library of utilities for sysadmin scripts
The newest version!
package com.mchange.sysadmin.taskrunner
object Env:
val MailTo = "SYSADMIN_MAIL_TO"
val MailFrom = "SYSADMIN_MAIL_FROM"
object Optional:
def mailTo = sys.env.get(Env.MailTo)
def mailFrom = sys.env.get(Env.MailFrom)
object Required:
private def required(envVar : String) : String = sys.env.get(envVar).getOrElse(throw new MissingEnvironmentVariable(envVar))
def mailTo = required(Env.MailTo)
def mailFrom = required(Env.MailFrom)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy