Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task command surround by single quite (') lead to syntax error on VSC 1.64.0 #142366

Closed
Massukio opened this issue Feb 7, 2022 · 1 comment
Closed
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@Massukio
Copy link

Massukio commented Feb 7, 2022

Does this issue occur when all extensions are disabled?: Yes/No
Yes

  • VS Code Version: 1.64.0
  • OS Version: Windows 10 Pro 64-bit

Steps to Reproduce:

  1. Using the custom task.json to run task
"version": "2.0.0",
    "tasks": [
        {
            "label": "Run File - Robot Pure (CMD)",
            "windows": {
                "command": "${workspaceFolder}\\.venv\\Scripts\\activate && python -m robot",

            },
            "linux": {
                "command": "source ${workspaceFolder}/.venv/bin/activate && python -m robot"
            },
            "args": [
                "--loglevel", "TRACE:INFO",
                "--outputdir", "report",
                "${file}"
            ],
            "type": "shell",
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",
                "panel": "new",
                "focus": true
            },
            "options": {
                "cwd": "${workspaceFolder}",
                "env": {
                    "PYTHONIOENCODING": "UTF-8",
                    "PYTHONPATH": "${workspaceFolder}",
                    "PATH": "${workspaceFolder}/.venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:"
                }
            }
        },
]
  1. The task run successfully on VSC 1.63.2
    But failed on VSC 1.64.0 and got syntax error
File name, directory name or volume label syntax is incorrect

Investigating the commands VSC executed, and find the difference below
VSC 1.63.2:
The command surround by Double Quotes on 1.63.2 which can be run successfully

The terminal process "C:\WINDOWS\System32\cmd.exe /d /c "...\.venv\Scripts\activate && python -m robot" --loglevel TRACE:INFO --outputdir report Test.robot"

VSC 1.64.0:
The command surround by Single Quotes on 1.64.0 which caused syntax error

The terminal process "C:\WINDOWS\System32\cmd.exe /d /c '...\.venv\Scripts\activate && python -m robot' --loglevel TRACE:INFO --outputdir report Test.robot"
@alexr00 alexr00 added the *duplicate Issue identified as a duplicate of another issue(s) label Feb 7, 2022
@alexr00
Copy link
Member

alexr00 commented Feb 7, 2022

Duplicate of #142196

@alexr00 alexr00 marked this as a duplicate of #142196 Feb 7, 2022
@alexr00 alexr00 closed this as completed Feb 7, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Mar 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

2 participants