The application configuration should be read from command line
options as well as from environment variables. The priority: cmd-line over env over defaults.
Change-Id: Ib62d5d68003a006901d9be8a81fca354def8fea4
Issue-ID: DCAEGEN2-748
Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
optionValue(cmdLineOpt)
protected fun CommandLine.hasOption(cmdLineOpt: CommandLineOption): Boolean =
optionValue(cmdLineOpt)
protected fun CommandLine.hasOption(cmdLineOpt: CommandLineOption): Boolean =
- this.hasOption(cmdLineOpt.option.opt)
+ this.hasOption(cmdLineOpt.option.opt) ||
+ System.getenv(cmdLineOpt.environmentVariableName()) != null
protected fun stringPathToPath(path: String): Path = Paths.get(File(path).toURI())
protected fun stringPathToPath(path: String): Path = Paths.get(File(path).toURI())