AvinZarlez / processing-vscode

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

run build task - path incorrect on windows #43

Closed ho-wan closed 6 years ago

ho-wan commented 6 years ago

The filepath generated in tasks.json is not correct for windows, the backslash needs to be escaped. Also, both set of args are being executed instead of just the windows args.

> Executing task: processing-java --force --sketch=C:\Users\howan\_github\CityGen\MP_A6_cityGen --output=C:\Users\howan\_github\CityGen\MP_A6_cityGen/out --run --force --sketch=C:\Users\howan\_github\CityGen\MP_A6_cityGen --output=C:\Users\howan\_github\CityGen\MP_A6_cityGen\out --run <

C:Usershowan_githubCityGenMP_A6_cityGen does not exist.
The terminal process terminated with exit code: 1
tasks.json
{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Run Sketch",
      "type": "shell",
      "group": {
        "kind": "build",
        "isDefault": true
      },
      "command": "processing-java",
      "presentation": {
        "echo": true,
        "reveal": "always",
        "focus": false,
        "panel": "dedicated"
      },
      "args": [
        "--force",
        "--sketch=${workspaceRoot}",
        "--output=${workspaceRoot}/out",
        "--run"
      ],
      "windows": {
        "args": [
          "--force",
          "--sketch=${workspaceRoot}",
          "--output=${workspaceRoot}\\out",
          "--run"
        ]
      }
    }
  ]
}
AvinZarlez commented 6 years ago

Hey there.

This is a bug with the new VSCode Live Share plugin I believe. The path is correct for Windows, but the problem is that your VSCode is running both the Mac/Linux args AND the Windows ones.

The problem is not caused by this extension, but rather your copy of VSCode plus another extension you have installed.

See these issues: https://github.com/Microsoft/vscode/issues/50006 https://github.com/Microsoft/vscode/issues/50299

ho-wan commented 6 years ago

I found out that it was changing the default terminal to bash in my settings.json that's causing the bug. "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",