Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #291 from liveh2o/master

JRuby 1.9 doesn't require posix/spawn
  • Loading branch information...
commit cd2c2552968e00c2c2bb28d03a967ddf4f77d6bc 2 parents 92c1909 + 7ad41da
@ddollar authored
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/foreman.rb
  2. +1 −1  lib/foreman/process.rb
View
4 lib/foreman.rb
@@ -8,8 +8,8 @@ def self.runner
File.expand_path("../../bin/foreman-runner", __FILE__)
end
- def self.jruby?
- defined?(RUBY_PLATFORM) and RUBY_PLATFORM == "java"
+ def self.jruby_18?
+ defined?(RUBY_PLATFORM) and RUBY_PLATFORM == "java" and ruby_18?
end
def self.ruby_18?
View
2  lib/foreman/process.rb
@@ -53,7 +53,7 @@ def run(options={})
Dir.chdir(cwd) do
Process.spawn env, expanded_command(env), :out => output, :err => output
end
- elsif Foreman.jruby?
+ elsif Foreman.jruby_18?
require "posix/spawn"
wrapped_command = "#{Foreman.runner} -d '#{cwd}' -p -- #{command}"
POSIX::Spawn.spawn env, wrapped_command, :out => output, :err => output
Please sign in to comment.
Something went wrong with that request. Please try again.