Use backticks instead of popen
Using popen here breaks brew install -v due to the way the error pipe is passed around during install.
This commit is contained in:
parent
d8c2642b6d
commit
8b4645d895
@ -153,7 +153,8 @@ def archs_for_command cmd
|
||||
cmd = `/usr/bin/which #{cmd}` unless Pathname.new(cmd).absolute?
|
||||
cmd.gsub! ' ', '\\ ' # Escape spaces in the filename.
|
||||
|
||||
archs = IO.popen("/usr/bin/file -L #{cmd}").readlines.inject([]) do |archs, line|
|
||||
lines = `/usr/bin/file -L #{cmd}`
|
||||
archs = lines.to_a.inject([]) do |archs, line|
|
||||
case line
|
||||
when /Mach-O (executable|dynamically linked shared library) ppc/
|
||||
archs << :ppc7400
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user