mirror of
https://github.com/moparisthebest/mailcatcher
synced 2024-11-16 22:25:25 -05:00
1.8.7 doesn't support IO.popen with options
This commit is contained in:
parent
744ee93c57
commit
69b91a1fa8
@ -1,3 +1,5 @@
|
|||||||
|
require 'open3'
|
||||||
|
|
||||||
require 'active_support/all'
|
require 'active_support/all'
|
||||||
require 'eventmachine'
|
require 'eventmachine'
|
||||||
require 'optparse'
|
require 'optparse'
|
||||||
@ -16,7 +18,9 @@ module MailCatcher
|
|||||||
module_function
|
module_function
|
||||||
|
|
||||||
def which command
|
def which command
|
||||||
IO.popen(["which", command], "r", :err => :close).read.chomp.presence
|
Open3.popen3 'which', 'command' do |stdin, stdout, stderr|
|
||||||
|
return stdout.read.chomp.presence
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def mac?
|
def mac?
|
||||||
|
Loading…
Reference in New Issue
Block a user