skeptick icon indicating copy to clipboard operation
skeptick copied to clipboard

Windows support?

Open jcron opened this issue 10 years ago • 7 comments

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?

jcron avatar Nov 12 '14 17:11 jcron

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.

maxim avatar Nov 12 '14 17:11 maxim

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 avatar Nov 12 '14 20:11 TheKidCoder

@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).

maxim avatar Nov 12 '14 21:11 maxim

So perhaps we should allow choosing between internal runner and cocaine via config option.

maxim avatar Nov 12 '14 21:11 maxim

Yeah, a config option would be good. I also think detecting a jruby/windows environment will set to use Cocaine.

TheKidCoder avatar Nov 12 '14 21:11 TheKidCoder

Might be redundant since cocaine has its own detection. Would be ideal to fix cocaine imo.

maxim avatar Nov 12 '14 21:11 maxim

@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

maxim avatar Feb 27 '15 22:02 maxim