aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
authorJames Harris2010-08-02 11:28:21 -0500
committerAdam Vandenberg2010-08-02 12:49:20 -0700
commit07ce6d6e1645a645477d104fff16e232b2985b63 (patch)
tree6f684769d6d63f7e4a2fb8cba98aabddeaa127de /Library/Homebrew/utils.rb
parentbc82bfc6d5d6509591b675b727712b7cc9559815 (diff)
downloadbrew-07ce6d6e1645a645477d104fff16e232b2985b63.tar.bz2
archs_for_command now follows symlinks.
Tell file(1) to follow symlinks using the -L option. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb2
1 files changed, 1 insertions, 1 deletions
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