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
After setting terminal to MSYS2, standard build tasks fail #40954
Comments
@robertmain Yes, looks like the same underlying root cause: The mistaken use of backslashes in all Windows paths, when Windows doesn't require them, and they fail in |
How do you mean mistaken ? Surely you need some kind of path separator? Should I/we be using forward slashes instead? |
@robertmain Forward slash works fine 99% of the time on Windows; it specifically works in
This fails because These backslashes are being generated by VS Code, and then passed into a VS Code needs to either use only forward slashes when it passes data to a shell, or it needs a (better?) way to detect |
Right, but even in my command I'm putting them in...and then code is stripping them out somehow..unless I've mis-understood something |
@robertmain No, you're not putting them in. It's running The path you're adding is the one to the |
ohhhhh Im with you now |
Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines. Happy Coding! |
I want to use MSYS2 as my terminal, and setting it up as follows seems to work fine in the terminal window:
But after that's enabled, I can't run my (
gulp
-based) build task. Here's what the output looks like:The backslashes are "eaten" as character escapes by the
bash
command line. If I run the same command from abash
command line but with forward slashes, it works fine. So the bug is that VS Code uses backslashes on Windows.Which aren't actually necessary on Windows: A forward slash is a reasonable substitute 99% of the time, and in this particular case works fine with PowerShell:
As such I would recommend replacing all backslashes with forward slashes on Windows. If you can't do that, then at least swapping them when the terminal is set to any string that includes the word "bash" would work. A third option would be to have a setting that chooses whether to use forward slashes, which would at least enable a workaround. Currently my only workaround is "don't use MSYS2", which means I effectively don't get a terminal window I can use in VS Code because I use MSYS2 for my environment and have no desire to use
cmd
or PowerShell.Steps to Reproduce:
gulp
task.gulp
build task. (Using "Run Build Task" if that's configured to agulp
build task, or "Run Task" and select agulp
task)Reproduces without extensions: Yes
The text was updated successfully, but these errors were encountered: