-
Notifications
You must be signed in to change notification settings - Fork 38.4k
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugconfirmation-pendingtasksTask system issuesTask system issuesterminal-processProblems launching processes, managing ptys, exiting, process leaks, etc.Problems launching processes, managing ptys, exiting, process leaks, etc.verifiedVerification succeededVerification succeeded
Milestone
Description
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.97.2
- OS Version: macOS 14.6.1
Steps to Reproduce:
- Define an
extensionHostdebug configuration with environment variables specified inenvorenvFile. - Write code in the extension or tests that spawns a
vscode.ShellExecutiontask that makes use of the above environment variables. - Observe that the spawned task does not inherit the environment variables from the debug configuration, contrary to the documentation of
vscode.ShellExecutionOptionswhich states that by default the parent process environment is inherited.
I created a self-contained workspace with the above steps already prepared. All you have to do is to run the Run Extension Tests debug configuration defined in launch.json to observe the problem.
I suspect that the issue is that the vscode.ShellExecution implementation caches process.env too early, before the environment variables of the debug configuration were applied.
I hope this helps.
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugconfirmation-pendingtasksTask system issuesTask system issuesterminal-processProblems launching processes, managing ptys, exiting, process leaks, etc.Problems launching processes, managing ptys, exiting, process leaks, etc.verifiedVerification succeededVerification succeeded