diff options
| author | James Harris | 2010-08-02 11:28:21 -0500 |
|---|---|---|
| committer | Adam Vandenberg | 2010-08-02 12:49:20 -0700 |
| commit | 07ce6d6e1645a645477d104fff16e232b2985b63 (patch) | |
| tree | 6f684769d6d63f7e4a2fb8cba98aabddeaa127de /Library/Homebrew/utils.rb | |
| parent | bc82bfc6d5d6509591b675b727712b7cc9559815 (diff) | |
| download | brew-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.rb | 2 |
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 |
