-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input redirection error on Windows #2
Comments
@SeanSnyders Thanks for trying this out and reporting the error! Looks like our CI might not be covering this case. Any reason why you don't have a C++ compiler installed? That'd be a good workaround until this is fixed. This should be resolved by #1, I just need to weight the tradeoffs against unix |
This adds a better fallback approach for Windows and systems lacking the `sleep` CLI utility. This relies on spawning a Node.js process designed to sleep for the desired time. This has a tradeoff that it typically sleeps for longer than the desired time, but it's available on all systems and is more predictable than `timeout` for Windows. This makes busy-waiting obsolete, so that section and test case have been removed. This should still avoid blocking the CPU, which is a more critical concern. Fixes #1, #2
@SeanSnyders can you try out that branch? Does it help out your issues? $ npm install nfischer/shelljs-plugin-sleep#feat-better-fallback |
I can have a look at that branch and see.
I indeed have a c++ compiler installed on my Win 10 x64 computer: MS VS2015. In general I have several issues with |
Seems like npm isn't able to pick up on it. This module depends on the sleep package, which is a C++ native extension. If I recall correctly, compilation happens during But I could be mistaken, I'm not well-versed in native extensions. |
My other native extensions compile fine, e.g. Edge. The typical system One needs to test that specifically to see if the correct function does indeed get called in that library. |
I've only seen us use the fallback functions if Can you provide output for
I misunderstood you. To me, "command" means shell command (i.e.
Right now integration tests pass. Ideally, it shouldn't matter if they're using node-sleep or the fallback, as long as things work on appveyor.
Any word on if the branch fixes things for you? If so, I'll land the change as the primary fallback. |
* feat: better fallback for Windows This adds a better fallback approach for Windows and systems lacking the `sleep` CLI utility. This relies on spawning a Node.js process designed to sleep for the desired time. This has a tradeoff that it typically sleeps for longer than the desired time, but it's available on all systems and is more predictable than `timeout` for Windows. This makes busy-waiting obsolete, so that section and test case have been removed. This should still avoid blocking the CPU, which is a more critical concern. Fixes #1, #2 * Bump engines value, since we didn't support v0.11 anyway
Fix is out, this should resolve issues. |
On Win 10 x64.
using versions:
Trying to do:
called via
npm
as a script.It works fine on macOS 10.12.* but fails on Win 10 x64 with error:
The text was updated successfully, but these errors were encountered: