aio-cli icon indicating copy to clipboard operation
aio-cli copied to clipboard

Confusing lowercase .env keys

Open purplecabbage opened this issue 1 year ago • 1 comments

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 avatar Apr 23 '24 22:04 purplecabbage

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

aiojbot avatar Apr 23 '24 23:04 aiojbot

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

aiojbot avatar Jun 28 '24 11:06 aiojbot