formatters fails on windows
elazarcoh opened this issue · 5 comments
Hi,
I'm getting this error message when trying to format with purs-tidy
and purty
[Error - 14:21:11] Error: spawn purs-tidy ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
[Error - 14:28:37] Error: spawn purty ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
This seems related to the reason node-cross-spawn exists in the first place.
I got the same error when trying using gulp
with Node's child_process.spwan
. Changing to node-cross-spawn
resolved it.
nwolverson/purescript-language-server#160
Tracked by the above language server issue. Other commands (eg purs
) avoid the issue via node-which, that's also how cross-spawn works/
Simply laziness to not fix this because it's a windows issue
I'll try to make a PR soon
@nwolverson Unfortunately, I won't be able to make a PR any time soon. I'm not proficient enough to understand the errors I'm seeing, and it's hard to figure out all the types of the local bounded variables (I saw it's an open issue)...
Anyway, it seems to be relatively simple to address this, as you already have spawnWithVersion which supposedly handles this.
It would be much appreciated if you can fix this 🙏.
If you can write the code, I can test it, if needed.
Hey, can you try the latest release, it contains a fix for this. I've not tested this on windows at all but it could just work :)
Thanks it works great! 🙏