Useful or not, from you.
vscode Paths separators in build config being escaped/stripped out prior to build command being run

<!-- Do you have a question? Please ask it on http://stackoverflow.com/questions/tagged/vscode. -->

<!-- Use Help > Report Issues to prefill these. -->

  • VSCode Version: 1.16.1
  • OS Version: Windows 10 Version 1703 Build 15063.608

Steps to Reproduce:

  1. Create launch.json with the following contents:
{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "typescript",
            "tsconfig": "tsconfig.json",
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}
  1. Run the build task
  2. Produces: /usr/bin/bash: c:UsersrobertCodeNodegraphicsnode_modules.bintsc.cmd: command not found - (notice how all the directories are run together with no directory separator) in the console(I have the shell set to use git bash, rather than cmd.exe)

<!-- Launch with code --disable-extensions to check. --> Reproduces without extensions: Yes

That's a useful answer
Without any help

@methodbox Not snark. Serious question. If you had a workaround for that, I'd be happy with a fix. Sorry if it came out snarky.

If you'll note, way above I posted my own experience:

> Executing task: d:\projects\[redacted]\node_modules\.bin\tsc.cmd -p "d:\projects\[redacted]\tsconfig.json" <

bash: d:projects[redacted]node_modules.bintsc.cmd: command not found
The terminal process terminated with exit code: 127

Terminal will be reused by tasks, press any key to close it.

See the example with all the directories running together? Because Bash treats the backslashes as escapes? Yeah, that's the exact same issue as the original bug reported. And it's not fixed, and WSL is not a workaround.

It's not any more of a "custom environment" than you're suggesting -- using MSYS as the internal terminal. Because I don't want to use CMD or PowerShell ever, and I'm far from alone in that desire.

My note was just pointing out that I can't use your workaround because it doesn't work with launch.json dependencies. A typescript task can notify launch.json tasks that the first build is done, and a shell task apparently can't.

There is another related issue having to do with path handling, and I did in fact file a bug for it: https://github.com/microsoft/vscode/issues/68812 -- in that case the problem is that the typescript tasks fail to recognize forward vs. reverse slashes, and if I could add a ${pathSeparator}, I could at least fix that issue.

If the bug is in the TypeScript plugin, then so be it -- fix it in the TypeScript plugin. But closing it without fixing it? That's not cool.