diff options
| author | Adam Vandenberg | 2011-03-19 09:14:59 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2011-03-19 09:14:59 -0700 |
| commit | 8b4645d895e6d998e56603dcd05362e20df0ac71 (patch) | |
| tree | 1f689e23c3180393487319f4341491325441fbf7 /Library | |
| parent | d8c2642b6d4892d139083147b0b91da734fd1a0f (diff) | |
| download | brew-8b4645d895e6d998e56603dcd05362e20df0ac71.tar.bz2 | |
Use backticks instead of popen
Using popen here breaks brew install -v due to the way
the error pipe is passed around during install.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/utils.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 5b4348080..072e8fd11 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -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 |
