-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Following up re: microsoft/vscode#140627 - where the solution was:
When commands are executed via the
${command:commandID}variable, they are passed the rest of the rest of the variables as arguments. Thepython.interpreterPathcommand might not be doing any argument validation before trying to do something with these arguments which results in an error. The solution is for the extension that providespython.interpreterPathto validate the arguments it receives.
Pasting original content below:
When creating a tasks.json file that includes both an input variable and a command variable, I get a [UriError]: Scheme contains illegal characters. error when attempting to run the task.
From the example below I can include ${command:python.interpreterPath} distinctly in the command, I can include ${input:thingToEcho} in the command, I can include each of the individually more than once, but when they're both together, I get the error.
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "echo",
"type": "shell",
"command": "echo '${command:python.interpreterPath} ${input:thingToEcho}'",
"problemMatcher": []
},
],
"inputs": [
{
"type": "promptString",
"id": "thingToEcho",
"description": "echo this too",
"default": "yay"
},
]
}
VS Code version: Code 1.63.2 (Universal) (899d46d82c4c95423fb7e10e68eba52050e30ba3, 2021-12-15T09:37:28.172Z)
OS version: Darwin arm64 20.6.0
Restricted Mode: No
System Info
| Item | Value |
|---|---|
| CPUs | Apple M1 (8 x 24) |
| GPU Status | 2d_canvas: enabled gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on rasterization: enabled skia_renderer: disabled_off_ok video_decode: enabled webgl: enabled webgl2: enabled |
| Load (avg) | 1, 2, 2 |
| Memory (System) | 8.00GB (0.11GB free) |
| Process Argv | --crash-reporter-id 4b272368-a334-4d04-ac60-c15f06478c7d |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30384385
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
vscop804:30404766
vs360cf:30404996
vsrem710:30416614
vsccppwtstudy:30421978