adobe / adobe/aio-cli

Confusing lowercase .env keys

Open
#611 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
95
Forks
45
PR merge metrics
No merged PRs in 30d

Description

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=`

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 =
```

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.