microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.61k stars 29.42k forks source link

Task API for `ShellExecutionOptions.env` type does not support `undefined` values #234358

Open karthiknadig opened 21 hours ago

karthiknadig commented 21 hours ago

Type: Bug

The TerminalOptions.env API supports environment variable values that include both string | undefined.

The ask is for this to match the TerminalOptions API.

Usage: We plan on using this in the Python extension where users can contribute environment variables via .env files. We want to make sure the experience is same for the env variable merge in both cases.

VS Code version: Code - Insiders 1.96.0-insider (69acde7458f428f0e6869de8915c9dd995cdda1a, 2024-11-21T05:04:38.064Z) OS version: Windows_NT x64 10.0.26100 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz (8 x 1498)| |GPU Status|2d_canvas: enabled
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
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off| |Load (avg)|undefined| |Memory (System)|31.60GB (12.74GB free)| |Process Argv|--log trace --log ms-python.python=info --crash-reporter-id 4fb1ebc1-cf4c-4880-a88a-47738ec3768d| |Screen Reader|no| |VM|0%|
Extensions (18) Extension|Author (truncated)|Version ---|---|--- tsl-problem-matcher|amo|0.6.2 ruff|cha|2024.54.0 esbuild-problem-matchers|con|0.0.3 vscode-eslint|dba|3.0.10 gitlens|eam|16.0.2 EditorConfig|Edi|0.16.4 prettier-vscode|esb|11.0.0 copilot|Git|1.245.1221 copilot-chat|Git|0.23.2024112103 vscode-github-actions|git|0.27.0 vscode-pull-request-github|Git|0.101.2024112104 debugpy|ms-|2024.13.2024111901 python|ms-|2024.21.0-dev vscode-pylance|ms-|2024.11.101 remote-containers|ms-|0.388.0 remote-wsl|ms-|0.88.5 extension-test-runner|ms-|0.0.12 code-spell-checker|str|4.0.21
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vsc_aacf:30263846 pythonvspyt551:31179976 vscod805cf:30301675 vsaa593cf:30376535 py29gd2263:31024238 c4g48928:30535728 vscrpc:30624061 a9j8j154:30646983 962ge761:30841072 pythonnoceb:30776497 asynctok:30898717 dsvsc014:30777825 dsvsc015:30821418 pythonmypyd1:30859725 h48ei257:31000450 pythontbext0:30879054 cppperfnew:30980852 pythonait:30973460 0ee40948:31013168 dvdeprecation:31040973 dwnewjupytercf:31046870 newcmakeconfigv2:31071590 nativerepl1:31134653 pythonrstrctxt:31093868 nativeloc1:31118317 cf971741:31144450 notreesitter:31116712 e80f6927:31120813 i21gd607:31141543 iacca1:31150324 notype1:31143044 dwcopilot:31158714 h409b430:31177054 5b1c1929:31184661 ```