-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sub() ignores variables set with BindEnv/AutomaticEnv #507
Milestone
Comments
Related to: #307 |
Ran into this issue, which took a couple hours of debugging to discover. I'd love to see some explicit documentation about this limitation, if not a fix. |
any updates on this? |
c2nes
pushed a commit
to c2nes/opencensus-service
that referenced
this issue
Aug 28, 2019
`viper.AutomaticEnv` is enabled and environment variable overrides works for configuration sections outside of `exporters`. However, a Viper limitation (spf13/viper#507) prevents this from working as expected in "sub" viper instances. This work around allows environment variables to be used with exporter configurations as well.
c2nes
pushed a commit
to c2nes/opencensus-service
that referenced
this issue
Aug 28, 2019
`viper.AutomaticEnv` is enabled and environment variable overrides works for configuration sections outside of `exporters`. However, a Viper limitation (spf13/viper#507) prevents this from working as expected in "sub" viper instances. This work around allows environment variables to be used with exporter configurations as well.
This was referenced Sep 22, 2020
This was referenced Mar 23, 2021
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following example fails because Sub() because variables overwritten in env are ignored.
The output of the program is:
The text was updated successfully, but these errors were encountered: