observing/pre-commit

invoking npm with cp.spawn doesn't work on windows

Closed this issue · 7 comments

This fails on windows with the error:

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENOENT
    at errnoException (child_process.js:1001:11)
    at Process.ChildProcess._handle.onexit (child_process.js:792:34)

because you can't use spawn to invoke npm on windows.

So we should .exec instead?

Yes, if possible. Alternatively if it really must be spawn you can use something like https://github.com/ForbesLindesay/win-spawn

@3rd-Eden I can confirm that after installing the forked module from @JGAntunes it worked fine on Windows.

pre-commit version is 0.0.9 published 7 months ago
This doesn't work on Windows,
Can publish a new version ?

@noyobo Publishing right away.

I'm going to close this as I assume that current master fixes all the things.

👍 Thank you