devcontainers / devcontainers/cli

`containerEnv` input validation

Open
#644 1 comment 1 reaction 0 assignees View on GitHub
feature-request
Dominant language
TypeScript
Stars
3k
Forks
457
Avg merge
13h 17m
Merged PRs (30d)
6

Description

Debugged a fun issue recently with a `containerEnv` similar to below:

```jsonc
"containerEnv": {
"BUNDLE_RUBYGEMS__PKG__GITHUB__COM`": "${localEnv:GITHUB_USER}:${localEnv:GITHUB_TOKEN}"
}
```

Notice the stray backtick character at the end of the environment key 😅

Such an environment key causes a failure when [setting up dotfiles](https://github.com/devcontainers/cli/blob/main/src/spec-common/dotfiles.ts#L74).

The CLI would benefit from additional input validation to make such typos easier to debug.

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.