2022.6.12 - Alle Umgebungsvariablen #74

Merged
edraft merged 1 commits from 2022.6.12 into 2022.6 2022-05-24 17:39:21 +02:00

View File

@ -200,10 +200,11 @@ class Configuration(ConfigurationABC):
self._additional_arguments.append(arg_str) self._additional_arguments.append(arg_str)
def add_environment_variables(self, prefix: str): def add_environment_variables(self, prefix: str):
for variable in ConfigurationVariableNameEnum.to_list(): for env_var in os.environ.keys():
var_name = f'{prefix}{variable}' if not env_var.startswith(prefix):
if var_name in [key.upper() for key in os.environ.keys()]: continue
self._set_variable(variable, os.environ[var_name])
self._set_variable(env_var.replace(prefix, ''), os.environ[env_var])
def add_console_argument(self, argument: ArgumentABC): def add_console_argument(self, argument: ArgumentABC):
self._argument_types.append(argument) self._argument_types.append(argument)