AvinZarlez / processing-vscode

A Visual Studio Code extension for the programming language Processing
https://marketplace.visualstudio.com/items?itemName=Tobiah.language-pde
MIT License
177 stars 25 forks source link

Error when running build task #56

Closed WissenIstNacht closed 5 years ago

WissenIstNacht commented 5 years ago

Hi there

I'm getting the following error when running the the build task:

/bin/bash: /d: No such file or directory The terminal process terminated with exit code: 127

I have followed all the instructions. Path is set correctly.

AvinZarlez commented 5 years ago

What is your processing.path setting set to, if anything? This is linux? Can you post your task file? By path set correctly, you mean you can hit processing-java in any folder correct?

WissenIstNacht commented 5 years ago

Thanks for the quick responce and sorry for the lack of information. I'm on windows but have the linux subsystem running. And yes that's what I meant by "set correctly". I've managed to get it working in the meantime, but I'm still not sure what the problem was. This is my task file now:

{ "version": "2.0.0", "tasks": [ { "label": "Run Sketch", "type": "shell", "group": { "kind": "build", "isDefault": true }, "command": "${config:processing.path}", "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "dedicated" }, "args": [ "--force", "--sketch=${workspaceRoot}", "--output=${workspaceRoot}/out", "--run" ], "windows": { "options": { "shell": { "executable": "cmd.exe", "args": [ "/d", "/c" ] } }, "args": [ "--force", "--sketch=${workspaceRoot}", "--output=${workspaceRoot}\out", "--run" ] } } ] }

AvinZarlez commented 5 years ago

Was your task file different than before?

I'm glad it's working now, so it seems? Let me know what you did to make it work through, if you can remember what changed.

Looks like there was something to do with which bash the commands were running in. I suspect that "/d: No such file or directory" means it couldn't find your D drive within the linux terminal. Or at least, it was passing the wrong (probably windows) commands to do so. I assume since you are on Windows, your processing install would be in Windows as well, so just keep everything Windows and you should be fine.

WissenIstNacht commented 5 years ago

I added this part to the task file (see above):

"options": { "shell": { "executable": "cmd.exe", "args": [ "/d", "/c" ] } },

micuat commented 5 years ago

I encountered this problem too since I switched my default terminal to bash. As @WissenIstNacht suggests, setting the default shell to cmd would fix the problem. I guess this should be in the default task file, or at least it should be described in the README.