Most shells doesn't allow env variables with dashes. Also, by convention, environment variables should be uppercased and words separated by underscores.
However, feature flags no always following this convention.
When you want to switch between multiple providers easily (and I believe this is one of the OpenFeature targets) your flags should have the same name in all providers, which is not the case for the env provider.
Perhaps this could be solved by providing a mapper function as a provider option. This mapper could map requested flag name into environment variable name.
Configuration solutions like viper and koanf already follow this approach for environment variable providers and it works fine
Most shells doesn't allow env variables with dashes. Also, by convention, environment variables should be uppercased and words separated by underscores. However, feature flags no always following this convention. When you want to switch between multiple providers easily (and I believe this is one of the OpenFeature targets) your flags should have the same name in all providers, which is not the case for the env provider.
Perhaps this could be solved by providing a mapper function as a provider option. This mapper could map requested flag name into environment variable name. Configuration solutions like viper and koanf already follow this approach for environment variable providers and it works fine