twibiral / obsidian-execute-code

Obsidian Plugin to execute code in a note.
MIT License
994 stars 61 forks source link

Prevent killWithChildren from needless throwing #354

Closed jamesbtan closed 1 month ago

jamesbtan commented 1 month ago

The pkill command seems to return a 1 error code when it cannot any matching processes. reference

In this case, if the runtime environment has not spawned any child processes then it will return a 1 error-code, causing execSync to throw an error and prevent the runtime from getting killed.

Here we ignore the 1 error code and rethrow any other errors.

jamesbtan commented 1 month ago

This should resolve #281 #188.

twibiral commented 1 month ago

Thank you so much! This is awesome!

twibiral commented 1 month ago

Published in release version 1.12.0