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

two different keys set the same key in .env for the leading AIO_ prefix (quirk) #49

Open
shazron opened this issue Aug 24, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@shazron
Copy link
Member

shazron commented Aug 24, 2020

For an .env file

AIO_RUNTIME_AUTH=foo
AIO__RUNTIME_AUTH=bar

Both keys are effectively the same key runtime.auth
This will not be apparent to the user, and may just be a documentation issue.

AIO_RUNTIME_AUTH is processed as runtime.auth
AIO__RUNTIME_AUTH is processed as .runtime.auth (note the leading period). The leading period is split out when calling setValue.

Fix:

Document that any .env vars that are prefixed by AIO_ or AIO__ are equivalent (one or two underscores). Anything more than two will be reflected as an underscore itself.

shazron added a commit to adobe/aio-lib-web that referenced this issue Aug 24, 2020
shazron added a commit to adobe/aio-lib-web that referenced this issue Aug 24, 2020
@purplecabbage
Copy link
Member

Yeah, _ is interpreted as . and (double) __ become _
However, this is applied after AIO_ so it looks like we discard the leading .

AIO_CASE=1 => case:1
AIO_CASE_TWO=2 => case: { two: 2 }
AIO_CASE__THREE=3 => case_three:3

@shazron shazron added the bug Something isn't working label Apr 13, 2023
@aiojbot
Copy link
Collaborator

aiojbot commented Apr 13, 2023

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-2229

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants