From 07ce6d6e1645a645477d104fff16e232b2985b63 Mon Sep 17 00:00:00 2001 From: James Harris Date: Mon, 2 Aug 2010 11:28:21 -0500 Subject: [PATCH] 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(-) diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 8b3d6fb793..a34e108de2 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