From 74bcfa464d1b2e6d8ce44cdab1b04ec3ed2912c6 Mon Sep 17 00:00:00 2001 From: James Harris Date: Mon, 2 Aug 2010 11:28:21 -0500 Subject: archs_for_command now follows symlinks. Tell file(1) to follow symlinks using the -L option. Signed-off-by: Adam Vandenberg --- Library/Homebrew/utils.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Library/Homebrew/utils.rb') diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 8b3d6fb79..a34e108de 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -177,7 +177,7 @@ 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 #{cmd}").readlines.inject([]) do |archs, line| + archs = IO.popen("/usr/bin/file -L #{cmd}").readlines.inject([]) do |archs, line| case line when /Mach-O (executable|dynamically linked shared library) ppc/ archs << :ppc7400 -- cgit v1.2.3