On Obisidian Quits-Event not working? #324
Replies: 1 comment 4 replies
-
Ah, Ask for confirmation before execution doesn't work well when used with the Obsidian quits event. I never came to think about using those two together, maybe I should add some tip to docs about not to use them together, or even disable turning both on if one of them is on already. The problem is that when Obsidian quits, there's AFAIK no way for plugins to postpone (or cancel) closing the application. Obsidian just closes and tries to inform plugins about the closure, but even the informing is not guaranteed. This leads to a situation where the Obsidian quits event triggers your shell command, but as the confirmation setting is on, a confirmation dialog is tried to be opened - but that doesn't happen because Obsidian has already quit before the dialog has any time to show up. (The same applies for Prompts, too, that could be used in place of the confirmation setting, although I guess you are not using them here.) So:
Please let me know if this helped at all, or if you still have problems or questions. 🙂 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I start a service on a port on obsidian start, and I want to kill that service when obsidian quits. In PowerShell when I execute
Stop-Process -Id (Get-NetTCPConnection -LocalPort 18081).OwningProcess -Force
it works perfectly, but shell commands does not seem to be executed on obsidian quit. I already checked “Ask for confirmation before execution” but I also do not get the prompt and configured it to run in PowerShell 5 on Windows.
Does anyone experience the same issue, or did I just configure the command wrong?
Best,
Sebastian
Beta Was this translation helpful? Give feedback.
All reactions