-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Resolve file related ${} variable in tasks to have appropriate slash for shell #84016
Comments
@liukai234 In what file are you using the |
{
// https://go.microsoft.com/fwlink/?LinkId=733558
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "gcc.exe build active file",
"presentation": {
"echo": false,
"reveal": "never",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true
},
"command": "D:\\Program Files\\mingw64\\bin\\gcc.exe",
"args": [
"-g",
"${file}", // This ${file} and second line below ${fileDirname}, ${fileBasenameNoExtension}
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "D:\\Program Files\\mingw64\\bin"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
} |
Sort of a duplicate of #38381, but we can probably be better about resolving variables to have a slash that is correct for bash. |
IMHO only forward slashes in path parameters should be allowed and used. |
In the development of C + + in vscode under Windows version, the file separator in ${file} ,etc. is \, while in Bash is /, which will cause that the development of C + + cannot be compiled after vscode uses bash integrated terminal.
The text was updated successfully, but these errors were encountered: