devcontainers / devcontainers/cli

`containerEnv` input validation

未关闭
#644 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
feature-request
主要语言
TypeScript
星标
3k
派生
457
平均合并
13 小时 17 分钟
30 天内合并 PR
6

描述

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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。