Skip to content

Instantly share code, notes, and snippets.

View fchiron's full-sized avatar

Florent Chiron fchiron

  • Nantes, France
  • 09:51 (UTC +02:00)
View GitHub Profile

Keybase proof

I hereby claim:

  • I am fchiron on github.
  • I am fchiron (https://keybase.io/fchiron) on keybase.
  • I have a public key whose fingerprint is C151 096B 87B5 950E 8287 AB45 C79E 669B AFDC 27ED

To claim this, I am signing this object:

lazy val dotEnvFile = taskKey[String]("Defines the file to load environment variables from")
dotEnvFile := ".env"
// The task returns the loaded dotEnv file and a map of the loaded variables, in case it would need to be manipulated somewhere else
lazy val loadEnv = taskKey[(File, Map[String, String])]("""Loads the environment variables from file defined by task `dotEnvFile` (they must follow the format "export X=Y")""")
loadEnv := {
val logger = ConsoleLogger()
val sourceFileName = dotEnvFile.value