diff --git a/stechuhr_server/config.py b/stechuhr_server/config.py index 27c3be35fd092be140c2037f84121c1ae285458e..904cb12c4f22dff6900b6c3b8bc522915361b87c 100644 --- a/stechuhr_server/config.py +++ b/stechuhr_server/config.py @@ -67,7 +67,7 @@ def initialize_config(application_name: str, default_config: str, app) -> dict: # Generate a environment variable name from the application name # E.g. "foo bar" becomes "FOO_BAR_CONFIG_PATH" - config_path_environment_variable = "{}_CONFIG_PATH".format(application_name.upper().replace(" ", "_")) + config_path_environment_variable = "{}_CONFIG_PATH".format(application_name.upper().replace(" ", "_").replace("-", "_")) # If the environment variable is set, use that as a config path, otherwise use the default one config_dir = this_or_else(os.environ.get(config_path_environment_variable), dirs["config"])