Skip to content
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

fix: Invalid env var separator on bash #223

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

spencewenski
Copy link
Member

@spencewenski spencewenski commented Jun 21, 2024

We use . as the env var separator in order to differentiate between the prefix and different levels of the config vs individual config field names (which would be in UPPER_SNAKE_CASE). However, . is not a valid bash identifier, so we need to use something different.

Switch to using a double underscore (__) instead of .. This way, we can support bash and still be able to differentiate between the prefix and different levels of the config vs individual config field names.

Note: we will continue to allow using . until the next breaking semver release (0.4)

Closes: #219

Copy link

codecov bot commented Jun 21, 2024

Codecov Report

Attention: Patch coverage is 0% with 18 lines in your changes missing coverage. Please review.

Project coverage is 43.96%. Comparing base (c15d9e3) to head (8debc78).

Files Coverage Δ
src/config/app_config.rs 33.33% <0.00%> (-4.85%) ⬇️
src/config/environment.rs 6.25% <0.00%> (-2.09%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c15d9e3...8debc78. Read the comment docs.

We use `.` as the env var separator in order to differentiate between the prefix
and different levels of the config vs individual config field names
(which would be in UPPER_SNAKE_CASE). However, `.` is not a valid bash
identifier, so we need to use something different.

Switch to using a double underscore (`__`) instead of `.`. This way, we can
support bash and still be able to differentiate between the prefix
and different levels of the config vs individual config field names.

Closes: #219
@spencewenski spencewenski force-pushed the 219-invalid-env-var-separator branch from 04deb91 to 8debc78 Compare June 21, 2024 02:59
@spencewenski spencewenski merged commit d85e85d into main Jun 21, 2024
13 of 14 checks passed
@spencewenski spencewenski deleted the 219-invalid-env-var-separator branch June 21, 2024 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid env var seperator on bash
1 participant