cli icon indicating copy to clipboard operation
cli copied to clipboard

`containerEnv` input validation

Open joshspicer opened this issue 3 years ago • 1 comments

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

 "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.

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

joshspicer avatar Sep 22 '23 20:09 joshspicer

It looks like patternProperties would work: https://github.com/devcontainers/spec/commit/ff733840e80b302ab3d0d3ea15e81d6c3c5190f7 👍

chrmarti avatar Sep 26 '23 07:09 chrmarti