mkloubert / vscode-remote-workspace

Multi protocol support for handling remote files like local ones in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=mkloubert.vscode-remote-workspace
GNU Lesser General Public License v3.0
206 stars 36 forks source link

Running vscode tasks: cwd parameter not working "chdir(2) failed.: No such file or directory" #56

Open freifrauvonbleifrei opened 5 years ago

freifrauvonbleifrei commented 5 years ago

I can not run the usual vscode tasks over sftp even if they operate in the workspace root:

"options": {
                "cwd": "${workspaceRoot}"
            },

(in .vscode/tasks.json) and even if the cwd is not given.

I always get

chdir(2) failed.: No such file or directory
The terminal process terminated with exit code: 1

Is this a known issue or does it work for others?

JustFly1984 commented 5 years ago

I have same issue, latest vscode, mac os 10.14 Mojave

Restry commented 5 years ago

+1

Annihilater commented 5 years ago

+1

willigarneau commented 5 years ago

+1

I got the same issue with the latest version of Mac OS (Mojave 10.14)

ironbishop commented 5 years ago

That's because tasks are executed locally. To add this feature (please), extension.remote.workspace.executeRemoteCommmand needs to accept arguments, which currently doesn't (I think?).

Task:

    {
        "label": "check",
        "type": "process",
        "problemMatcher": [],
        "linux":   { "command": "uname -a" },
        "windows": { "command": "hostname" }
    }

Output (remote is linux, locale is windows):

> Executing task in folder nagios: C:\Windows\system32\hostname.exe  <

The terminal process terminated with exit code: 2

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

If it accepted arguments, this could be a working solution:

    {
        "label": "check",
        "type": "shell",
        "command": "${command:extension.remote.workspace.executeRemoteCommmand}",
        "problemMatcher": [],
        "args": ["hostname"]
    }
xmine64 commented 5 years ago

I can't start internal terminal, it closes immediately with this error.