Microsoft/vscode

Allow blocked environment variables through if they're included explicitly in terminal launch configs

Open

#104,154 创建于 2020年7月15日

在 GitHub 查看
 (9 评论) (1 反应) (1 负责人)TypeScript (74,848 star) (10,221 fork)batch import
feature-requesthelp wantedterminal-process

描述

  • VSCode Version: 1.47.1 (not insider as I can't get docker builds working on that for some reason)
  • Local OS Version: Windows 10 2004
  • Remote OS Version: WSL2 Ubuntu 20.04
  • Remote Extension/Connection Type: Docker Desktop using WSL2 backend

Steps to Reproduce:

  1. Create a new project with a single file:
# .devcontainer/devcontainer.json
{
  "image": "alpine:latest",
  "remoteEnv": {
    "GOOGLE_API_KEY": "api-key",
    "GOOGLE_SOMETHING_ELSE": "something-else"
  }
}
  1. Rebuild and Reopen in Container
  2. In the remote terminal, check the environment for variables:
$ printenv | grep GOOGLE

Expected outcome:

GOOGLE_API_KEY=api-key
GOOGLE_SOMETHING_ELSE=something-else

Actual outcome:

GOOGLE_SOMETHING_ELSE=something-else

This is the same no matter the base image used. Changing the name of GOOGLE_API_KEY to anything else, even by a single character, allows it through.

Does this issue occur when you try this locally?: Not relevant as this is a remote container build Does this issue occur when you try this locally and all extensions are disabled?: Not relevant as this is a remote container build

贡献者指南

Allow blocked environment variables through if they're included explicitly in terminal launch configs · Microsoft/vscode#104154 | Good First Issue