PIO and VSCode; spaces in paths in tasks.json

VSCode 1.14.1 with PlatformIO IDE 0.4.0 all up to date at time of writing. Fresh install into Windows 10.

tasks.json gets automatically created as follows:

    "version": "0.1.0",
    "runner": "terminal",
    "command": "\"C:\\Users\\Bob Brown\\.platformio\\penv\\Scripts\\platformio.exe\"",
    "isShellCommand": false,

Note the “Bob Brown” in the command path.

This causes a build to fail:

C:\Users\Bob : The term 'C:\Users\Bob' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ C:\Users\Bob Brown\.platformio\penv\Scripts\platformio.exe -c vscode  ...
+ ~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\Bob:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

If I try to manually update tasks.json (change “Bob Brown” -> “BOBBRO~1”, so that no spaces are in the path) it is automatically overwritten (I think by ms-vscode.cpptools).

Is there any workaround for this? My google fu hasn’t been able to turn up any solution.

Please file an issue here GitHub - platformio/platformio-vscode-ide: PlatformIO IDE for VSCode: The next generation integrated development environment for IoT

Could you try 0.5.0-beta.1 ? See

Thanks for the suggestion.

Sadly, that didn’t help.

When I have the .vscode folder open in the explorer panel, I can see the tasks.json disappear and then be re-created. Unfortunately, it appears to be identical and still contains the incorrect line:

"command": "\"C:\\Users\\Bob Brown\\.platformio\\penv\\Scripts\\platformio.exe\"",

I tried modifying settings.json as:

"[platformio-ide]":  {
    "customPATH": "C:/Users/BOBBRO~1/.platformio"

That didn’t do anything…not even really sure that this is the correct syntax…

Created issue