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

Confusing lowercase .env keys #611

Open
purplecabbage opened this issue Apr 23, 2024 · 1 comment
Open

Confusing lowercase .env keys #611

purplecabbage opened this issue Apr 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@purplecabbage
Copy link
Member

When we aio app use to get new credentials for a project/namespace the .env file is merged/overwritten. The values we write are of the form:
AIO_runtime_namespace=<some-value>

If we want to access one of these values, we must use all CAPS because of the way they are read in.

  console.log('process.env.AIO_runtime_namespace = ', process.env.AIO_runtime_namespace)
  //> process.env.AIO_runtime_namespace =  undefined
  console.log('process.env.AIO_RUNTIME_NAMESPACE = ', process.env.AIO_RUNTIME_NAMESPACE)
  //> process.env.AIO_RUNTIME_NAMESPACE =  <some-value>

It would be less confusing if we just wrote these values as all UPPERCASE so users don't copy us when they populate .env and get confused when it does not work.

Environment Info

  System:
    OS: macOS 14.4.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 2.50 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node
    Yarn: 1.22.19 - ~/.bun/bin/yarn
    npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm
  Virtualization:
    Docker: 20.10.17 - /usr/local/bin/docker
  npmGlobalPackages:
    @adobe/aio-cli: 10.0.0

Sample Code that illustrates the problem

Logs taken while reproducing problem

@purplecabbage purplecabbage added the bug Something isn't working label Apr 23, 2024
@aiojbot
Copy link

aiojbot commented Apr 23, 2024

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

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

2 participants