Environment capture is leaking commands into shell history (and is broken) #24349
Labels
area-environments
Features relating to handling interpreter environments
area-terminal
bug
Issue identified by VS Code Team member as probable bug
needs PR
Ready to be worked on
Type: Bug
Behaviour
My shell history (Bash) has the following command periodically added to it:
I assume this extension is starting a full interactive shell in order to capture environment variables, i.e. such that history is enabled.
Secondly, the
printEnvVariablesToFile.py
script is broken:This opens the file with a default UTF-8 encoding. However, environment variables can contain any binary content except NUL bytes, so at some point this will crash. They can also contain newline characters, meaning that the
envVars.txt
file it produces cannot be reliably parsed.Steps to reproduce:
history
.Extension version: 2024.16.1
VS Code version: Code 1.94.2 (Universal) (384ff7382de624fb94dbaf6da11977bba1ecd427, 2024-10-09T16:08:44.566Z)
OS version: Darwin arm64 24.1.0
Modes:
python.languageServer
setting: DefaultUser Settings
Installed Extensions
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: