From 210c9ac2055566bb7fd8932299b55c29f1ececee Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 13 May 2012 19:00:10 -0500 Subject: Use 'which' helper method more Signed-off-by: Jack Nagel --- Library/Homebrew/utils.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Library/Homebrew/utils.rb') diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index f5530c29f..de797f2d6 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -482,8 +482,8 @@ module MacOS extend self return false unless MACOS %w[port fink].each do |ponk| - path = `/usr/bin/which #{ponk} 2>/dev/null` - return ponk unless path.empty? + path = which(ponk) + return ponk unless path.nil? end # we do the above check because macports can be relocated and fink may be -- cgit v1.2.3