wk-j / vscode-save-and-run

Visual Studio Code extension to run commands whenever a file is saved https://marketplace.visualstudio.com/items?itemName=wk-j.save-and-run
Apache License 2.0
32 stars 7 forks source link

Save&Run erase the clipboard with "cmd" content #6

Closed MayakoAelys closed 6 years ago

MayakoAelys commented 7 years ago

I use Save&Run to execute gulp whenever I save a .scss file. The issue is that when it executes the command, my clipboard content is replaced with "gulp" (which is the only content of the "cmd" attribute).

My config (workspace):

"saveAndRun": {
        "shell": "${workspaceRoot}",
        "commands": [
            {
                "match": ".scss",
                "cmd": "gulp",
                "isAsync": true
            }
        ]
    }
MayakoAelys commented 7 years ago

Seems related to https://github.com/wk-j/vscode-save-and-run/issues/5 in some ways

I'm using Windows 10 x64 (fully updated), but my Save&Run does work. I only have a issue with the clipboard being replaced.

Installed extension:

Nothing that messes with the clipboard.

Ciantic commented 7 years ago

This seems to be normal behavior of the program, it uses copy & pasting to terminal.

However, I've come to conclusion that this extension is not a right way anymore, since Tasks 2.0.0 is maturing and one can run simultaneous tasks. Right way to do this is do "Run Task on Save" plugin, that runs a task from tasks.json when saving some file.

What do you think @wk-j about running a specific task from tasks.json when saving?