diff options
-rw-r--r-- | hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/commandline/ArgBasedConfiguration.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/commandline/ArgBasedConfiguration.kt b/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/commandline/ArgBasedConfiguration.kt index da6f2d0a..44d425ea 100644 --- a/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/commandline/ArgBasedConfiguration.kt +++ b/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/commandline/ArgBasedConfiguration.kt @@ -74,7 +74,8 @@ abstract class ArgBasedConfiguration<T>(private val parser: CommandLineParser) { 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()) |