KEMBAR78
Shell commands in launch.json args are escaped · Issue #149910 · microsoft/vscode · GitHub
Skip to content

Shell commands in launch.json args are escaped #149910

@llabusch93

Description

@llabusch93

We have written the needed data into your clipboard because it was too large to send. Please paste.
Issue Type: Bug

Hello,

I worked with this launch configuration for ages now:

{
            "name": "Odoo 13.0 EE",
            "type": "python",
            "request": "launch",
            "program": "/usr/local/bin/odoo",
            "console": "integratedTerminal",
            "justMyCode": false,
            "args": [
                // "shell",
                "--database=dev_ee",
                "--log-level=test",
                "--config=${workspaceFolder}/.devcontainer/odoo.conf",
                "--addons-path=`/usr/bin/gen_addons_path -d ${workspaceFolder}`",
                "--dev=qweb,xml",
                "--load=base,web,base_test_db",
                "--init=lboucher_portal_order_widget",
                // "--test-enable",
                // "--test-tags=/",
                // "--stop-after-init",
                // "--load-language=en_US,de_DE,fr_CA",
                // "--language=fr_CA",
                // "--i18n-export=${workspaceFolder}/fr_CA.po",
                // "--modules=/"
            ]
        }

The special part is this line in the args:

"--addons-path=`/usr/bin/gen_addons_path -d ${workspaceFolder}`",

It calls the gen_addons_path script, what returns it then. This worked all the time, but as I wanted to start working today, it gives me this:
bash: /usr/bin/gen_addons_path -d /workspace: No such file or directory

Maybe it's because of the escape characters in the call itself:

/usr/bin/env /usr/bin/python3 /home/odoo/.vscode-server/extensions/ms-python.python-2022.6.2/pythonFiles/lib/python/debugpy/launcher 37455 -- /usr/local/bin/odoo --database=dev_ee --log-level=test --config=/workspace/.devcontainer/odoo.conf --addons-path=`/usr/bin/gen_addons_path\ -d\ /workspace` --dev=qweb,xml --load=base,web,base_test_db --init=lboucher_portal_order_widget

If I remove the arguments for this script, the call seems to work, but then the script fails, as it needs the arguments obviously...

"--addons-path=`/usr/bin/gen_addons_path`",
gen_addons_path: error: the following arguments are required: -d/--dirs

So what's the issue here, did you guys update something on the vs-code-server? If so, please revert it...

VS Code version: Code 1.67.2 (c3511e6, 2022-05-17T18:23:40.286Z)
OS version: Linux x64 5.15.40-xanmod1-tt
Restricted Mode: No
Remote OS version: Linux x64 5.15.40-xanmod1-tt

System Info
Item Value
CPUs Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz (16 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 1, 1, 1
Memory (System) 30.99GB (8.54GB free)
Process Argv --unity-launch --crash-reporter-id 557eb4c0-99af-49aa-bb58-b678e307c4c2
Screen Reader no
VM 0%
DESKTOP_SESSION pop
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP pop
XDG_SESSION_TYPE x11
Item Value
Remote Dev Container: Odoo 13.0 Development Container
OS Linux x64 5.15.40-xanmod1-tt
CPUs Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz (16 x 4534)
Memory (System) 30.99GB (8.56GB free)
VM 0%
Extensions (30)
Extension Author (truncated) Version
better-comments aar 3.0.0
eml lei 0.4.0
dotenv mik 1.0.1
jupyter-keymap ms- 1.0.0
remote-containers ms- 0.234.0
remote-ssh ms- 0.80.0
remote-ssh-edit ms- 0.80.0
remote-wsl ms- 0.66.3
vscode-remote-extensionpack ms- 0.21.0
material-icon-theme PKi 4.17.0
better-comments aar 3.0.0
gitlens eam 12.0.6
vscode-html-css ecm 1.12.2
todo-tree Gru 0.0.215
beautify Hoo 1.5.0
OdooSnippets jig 1.5.0
restructuredtext lex 189.0.0
document min 2.1.21
python ms- 2022.6.2
vscode-pylance ms- 2022.5.2
jupyter ms- 2022.4.1021342353
jupyter-keymap ms- 1.0.0
jupyter-renderers ms- 1.0.6
indent-rainbow ode 8.3.1
vscode-thunder-client ran 1.16.3
vscode-xml red 0.20.0
code-spell-checker str 2.2.0
simple-rst tro 1.5.2
vscodeintellicode Vis 1.2.21
markdown-all-in-one yzh 3.4.3
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vsdfh931:30280409
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebug:30492333
vsclangdc:30486549

Metadata

Metadata

Assignees

Labels

debugDebug viewlet, configurations, breakpoints, adapter issuesfeature-requestRequest for new features or functionalityon-testplan

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions