-
Notifications
You must be signed in to change notification settings - Fork 41
shellStartup doesn't work properly in a devcontainer #986
Copy link
Copy link
Closed
microsoft/vscode
#293628Labels
area-activationIssue related to activation. Root cause can be from interpreter selection or activation in terminalIssue related to activation. Root cause can be from interpreter selection or activation in terminalarea-terminalEnvironment extension specific terminal issues.Environment extension specific terminal issues.bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugconfirmation-pendingThe issue needs to be confirmed through a maintainer reproducing the bug.The issue needs to be confirmed through a maintainer reproducing the bug.
Milestone
Metadata
Metadata
Assignees
Labels
area-activationIssue related to activation. Root cause can be from interpreter selection or activation in terminalIssue related to activation. Root cause can be from interpreter selection or activation in terminalarea-terminalEnvironment extension specific terminal issues.Environment extension specific terminal issues.bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugconfirmation-pendingThe issue needs to be confirmed through a maintainer reproducing the bug.The issue needs to be confirmed through a maintainer reproducing the bug.
I have found an interesting bug. You can reproduce it by opening the MRE below in VSCode, then reopening it in a devcontainer, and then opening the workspace configuration provided.
All terminals, Python debugging, etc., will select the Python environment of the last Python file you have opened in the editor. If you don't open any files, you'll see all terminals, even the ones that should activate
proj2will activateproj1instead. The intriguing part is that this happens only in a devcontainer and only when usingshellStartup. Outside of it is fine.I've checked the trace logs, and it seems that
createProcessover here has the correct env vars set inshellLaunchConfigbut has the wrong ones inenvand those are overwriting the ones passed by the Python Environments extension.reproducer.zip