emeraldwalk / vscode-runonsave

Visual Studio Code extension to run commands whenever a file is saved.
Apache License 2.0
182 stars 57 forks source link

Feature Request: Set the CWD before cmd execution #16

Closed BlacKCaT27 closed 7 years ago

BlacKCaT27 commented 7 years ago

Currently, the CWD when running commands is always set to the VS Code installation directory (presumably since VS Code's plugin manager is the API used to invoke commands). If possible, it'd be extremely helpful to be able to specify a CWD to change to before executing a command. As it stands now, I'm blocked from automating some of my tasks when using this plugin because the CWD is in a write-protected area (program files) so my tasks can't write to disk.

BlacKCaT27 commented 7 years ago

It occurs to me now that one could simply prepend a cmd argument with "cd &&" to achieve this, so maybe just a quick addition to the readme to call out the default CWD being in write-protected space could prove helpful to others.