skeptick
skeptick copied to clipboard
Windows support?
I have a small script that runs fine on my Mac OSX but when trying to run the same thing on a Windows machine, I get the following error:
c:/Ruby21/lib/ruby/gems/2.1.0/gems/posix-spawn-0.3.9/lib/posix/spawn.rb:164: warning: cannot close fd before spawn
Is this supported for a windows environment?
Hm, we're using https://github.com/rtomayko/posix-spawn to run the command, and it doesn't actually support windows. I would love a patch that makes it work on both (e.g. using http://github.com/thoughtbot/cocaine) while still maintaining support of options such as timeout, at least for *nix.
I would be open to start working on cocaine support as we are using JRuby and have had to resort to running the debug output from MRI as a string in jRuby... not the worst solution, but not ideal.
@TheKidCoder sounds great, there's just one problem with cocaine's posix-spawn runner — it doesn't use ::Posix::Spawn::Child.new, which seems to be the only way to use timeouts. I describe the issue here (in Update): https://github.com/thoughtbot/paperclip/issues/1638 (this issue wasn't related to skeptick, just something I wanted to do in paperclip).
So perhaps we should allow choosing between internal runner and cocaine via config option.
Yeah, a config option would be good. I also think detecting a jruby/windows environment will set to use Cocaine.
Might be redundant since cocaine has its own detection. Would be ideal to fix cocaine imo.
@TheKidCoder not sure if you're still interested, but for now I submitted an issue to fix cocaine's posix-runner, hopefully we can go from there. https://github.com/thoughtbot/cocaine/issues/81