You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Git Bash on windows, vscode emits workspaceFolder and fileDirname with back slashes which are ignored in Git Bash, this creates an issue with paths.
Should there be an option to change backward slashes to forward slashes?
To my understanding, forward slashes work in all environments, why is it not the default?
I also tried adding the feature myself but I need some guidance as I haven't contributed to any big open source projects before.
Edit:
When creating C++ build and debug tasks, vscode generates two files: launch.json and task.json, these two files contain information about the program directory, the path of the executable to be generated.
Both can be noticed in this code snippet:
"configurations": [{"program": "${fileDirname}/${fileBasenameNoExtension}.exe","cwd": "${workspaceFolder}",// ... more properties}]
The ${fileDirname} and ${workspaceFolder} parameters emitted by vscode generated the file directory path with backward slashes on windows, eg: D:\examplefolder\subfolder.
This works well on cmd but doesn't work with Git Bash, because Git Bash required backslashes to be escaped.
However, both cmd and Git Bash accept forward slashes as path separators, the option requested is a vscode settings option to make these variables generate forward slashes instead of backward slashes on windows
The text was updated successfully, but these errors were encountered:
I'm using Git Bash on windows, vscode emits
workspaceFolder
andfileDirname
with back slashes which are ignored in Git Bash, this creates an issue with paths.Should there be an option to change backward slashes to forward slashes?
To my understanding, forward slashes work in all environments, why is it not the default?
I also tried adding the feature myself but I need some guidance as I haven't contributed to any big open source projects before.
Edit:
When creating C++ build and debug tasks, vscode generates two files:
launch.json
andtask.json
, these two files contain information about the program directory, the path of the executable to be generated.Both can be noticed in this code snippet:
The
${fileDirname}
and${workspaceFolder}
parameters emitted by vscode generated the file directory path with backward slashes on windows, eg:D:\examplefolder\subfolder
.This works well on cmd but doesn't work with Git Bash, because Git Bash required backslashes to be escaped.
However, both cmd and Git Bash accept forward slashes as path separators, the option requested is a vscode settings option to make these variables generate forward slashes instead of backward slashes on windows
The text was updated successfully, but these errors were encountered: