Skip to content

Confusing lowercase .env keys #611

Open
@purplecabbage

Description

@purplecabbage

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions