pucelle / vscode-run-on-save

Run configured shell commands when a file is saved in vscode, and output configured messages on status bar.
https://marketplace.visualstudio.com/items?itemName=pucelle.run-on-save
MIT License
50 stars 11 forks source link

Not running that I can see - Powershell command #22

Closed aggietallboy closed 1 year ago

aggietallboy commented 2 years ago

Hi There! I'm sure I've done something wrong.

I created a workspace settings.json:

{ "runOnSave.statusMessageTimeout": 3000, "runOnSave.commands": [ { "globMatch": ".", "command": "(Get-WmiObject -ComputerName myserver -Namespace \"root\sms\site_XXX\" -query \"select from sms_package where packageID = 'PACKID'\").RefreshPkgSource()", "runningStatusMessage": "Pushing changes to DP ${fileBasename}", "runIn": "terminal" }
] }

This command (untweaked with \" and \) works fine at the terminal in vscode.

This is an SCCM source repository, and as I make changes, I push them out so that I can test them. The WMI command forces an update to get picked up by SCCM, and made available for my testing.

I'm not seeing anything in the Developer Tools console when i save a file, nor am I seeing any activity in the terminal.

Is the settings for this only available at the "core?" are workspace specific supported?

Is my command malformed? slashes and quotes no-go? do single quotes need to be \ escaped as well?

pucelle commented 2 years ago

Sorry, I don't know what's happening. As I can see, if the command work in an environment, and not in another, even have no any message, may:

  1. The plugin didn't start up.
  2. The plugin didn't accept save event from VSCode plugin engine.

If the issue really bother you, best way should be fork and debugging it.

pucelle commented 1 year ago

Close since no response.