Skip to content

terminal.external.windowsExec user setting ignores quotes, and escape sequences #140974

Closed

Description

Issue Type: Bug

Steps to reproduce:

  1. F1 -> Preferences: Open Settings (JSON)
  2. Add (or update) the following property:
"terminal.external.windowsExec": "cmd.exe /k \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\Common7\\Tools\\VsDevCmd.bat\""
  1. F1 -> Open New External Terminal

Result:

The string ignores quotes so it does not process correctly the bat file path as it contains white spaces.

image

Expects

External console opened and bat file executed.

Additional notes

It works if using the integrated terminal configured as follows:

"terminal.integrated.profiles.windows": {
        "msvc": {
            "path": [
                "cmd.exe"
            ],
            "args": [
                "/k",
                "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Auxiliary\\Build\\vcvars64.bat"
            ]
        }
    },
    "terminal.integrated.defaultProfile.windows": "msvc",

VS Code version: Code 1.63.2 (899d46d, 2021-12-15T09:40:02.816Z)
OS version: Windows_NT x64 10.0.22000
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz (12 x 2712)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.73GB (2.79GB free)
Process Argv --crash-reporter-id b64a4848-b933-46f9-b40a-21de5103a498
Screen Reader no
VM 0%
Extensions (10)
Extension Author (truncated) Version
doxdocgen csc 1.3.2
go gol 0.30.0
better-cpp-syntax jef 1.15.10
vscode-docker ms- 1.19.0
cmake-tools ms- 1.9.2
cpptools ms- 1.7.1
cpptools-extension-pack ms- 1.1.0
code-spell-checker str 2.1.4
cmake twx 0.0.17
markdown-all-in-one yzh 3.4.0

(1 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythontb:30283811
pythonptprofiler:30281270
vsdfh931cf:30280410
vshan820:30294714
vstes263cf:30335440
vscoreces:30384385
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30424896
pythonvs932:30410667
vscop804cf:30404767
vscop453:30404998
vsrem710:30416614

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions