In case you need a hook to be executed outside of process, you should place correct shebang at the beginning of the file and CLI should spawn it.
However, this is not working at the moment, as when CLI detects that the hook should be spawned, it just does nothing. The code is incorrectly placed inside the if for in process execution. This causes another issue - in case a hook returns a function, which returns falsey value, we decide the hook should be executed outside of process and spawn a new Node.js process to execute the hook. So we execute it twice.
Fix the if-else logic, so the hooks will work correctly.
In case you need a hook to be executed outside of process, you should place correct shebang at the beginning of the file and CLI should spawn it. However, this is not working at the moment, as when CLI detects that the hook should be spawned, it just does nothing. The code is incorrectly placed inside the
if
for in process execution. This causes another issue - in case a hook returns a function, which returns falsey value, we decide the hook should be executed outside of process and spawn a new Node.js process to execute the hook. So we execute it twice.Fix the if-else logic, so the hooks will work correctly.