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

Build task surrounds args with asterisks in them in single quotes. #12023

Closed
datanasio opened this issue Feb 26, 2024 · 2 comments
Closed

Build task surrounds args with asterisks in them in single quotes. #12023

datanasio opened this issue Feb 26, 2024 · 2 comments

Comments

@datanasio
Copy link

Environment

  • OS and Version: Ubuntu Debian and Mac OS
  • VS Code Version: 1.86.2
  • C/C++ Extension Version: 1.19.4
  • If using SSH remote, specify OS of remote machine:

Bug Summary and Steps to Reproduce

Bug Summary:
If an asterisk if used in the tasks.json file for compiler args then the line is enclosed in single quotes.
The compiler reports that the file doesn't exist because the wildcard is not expanded.

Steps to reproduce:

  1. On a linux or mac computer, change the args line in tasks.json to read, "${fileDirname}/*.cpp"
  2. Use F5 or the run/degug button to build and execute the code.
  3. The compiler reports that the file cannot be found.
    This is the code that's produced to build the executable:
    /usr/bin/g++ "/home/dom/test/.cpp" -o /home/dom/test/test.out
    Error: cc1plus: fatal error: /home/dom/test/
    .cpp: No such file or directory

Configuration and Logs

{
    "tasks": [
        {
            "type": "cppbuild",
            "label": "C/C++: g++ build active file",
            "command": "/usr/bin/g++",
            "args": [
                "-fdiagnostics-color=always",
                "-g",
                "${fileDirname}/*.cpp",
                "-o",
                "${fileDirname}/${fileBasenameNoExtension}.out"
            ],
            "options": {
                "cwd": "${fileDirname}"
            },
            "problemMatcher": [
                "$gcc"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "detail": "Task generated by Debugger."
        }
    ],
    "version": "2.0.0"
}

Other Extensions

none

Additional context

No response

@sean-mcmanus
Copy link
Contributor

We're already working on a fix for this with #12001 .

Downgrading to 1.18.5 is the recommended workaround until we can release an update.

@sean-mcmanus sean-mcmanus closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2024
@datanasio
Copy link
Author

datanasio commented Feb 26, 2024 via email

@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants