`AZURE_AUTO-UPGRADE_ENABLE` is not a valid env var name on Linux
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 64
Description
It is not possible to set `AZURE_AUTO-UPGRADE_ENABLE` env var on Linux:
```
$ export AZURE_AUTO-UPGRADE_ENABLE=False
-bash: export: `AZURE_AUTO-UPGRADE_ENABLE=False': not a valid identifier
```
This is not a trivial fix. Possible solutions:
1. **Rename section name `auto-upgrade` to `auto_upgrade`**, so the env var becomes `AZURE_AUTO_UPGRADE_ENABLE`, but it will be difficult to distinguish between the section name and option name in `az config get` (it currently doesn't recognize sections that are set by env vars but not declared in `~/.azure/config`):
```
AZURE_AUTO_UPGRADE_ENABLE
############ ^^^^^^
section option
AZURE_AUTO_UPGRADE_ENABLE
#### ^^^^^^^^^^^^^^
section option
```
This will also cause a BREAKING CHANGE.
2. Keep `auto-upgrade` and **change Knack to make it accept `AZURE_AUTO_UPGRADE_ENABLE`**, but we face the same issue as above.
3. Rename `auto-upgrade` to `autoupgrade`. This will cause a BREAKING CHANGE.
Contributor guide
Assessment
This issue has not been assessed yet.