Commit e4df7810 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Fix error message

parent 23abce49
......@@ -43,14 +43,17 @@ class Config(var map: Map[String, Any]) extends Logging {
* @param valueName Name of value
*/
def loadConfigEnv(valueName: String) {
val globalFiles = sys.env.get(valueName).getOrElse("").split(":")
if (globalFiles.isEmpty) logger.info(valueName + " value not found, no global config is loaded")
for (globalFile <- globalFiles) {
val file: File = new File(globalFile)
if (file.exists()) {
logger.info("Loading config file: " + file)
loadConfigFile(file)
} else logger.warn(valueName + " value found but file does not exist, no global config is loaded")
sys.env.get(valueName) match {
case Some(globalFiles) => {
for (globalFile <- globalFiles.split(":")) {
val file: File = new File(globalFile)
if (file.exists()) {
logger.info("Loading config file: " + file)
loadConfigFile(file)
} else logger.warn(valueName + " value found but file '" + file + "' does not exist, no global config is loaded")
}
}
case _ => logger.info(valueName + " value not found, no global config is loaded")
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment