Fix boolean shell command calls

This commit is contained in:
Henrik Lissner 2014-06-17 23:19:48 -04:00
parent 5023081ac2
commit 130c0a2888
2 changed files with 5 additions and 5 deletions

View file

@ -40,19 +40,19 @@ module Homebrew
end
def self.has_keg?(keg)
`#{BIN} search #{keg}`
system("#{BIN} search #{keg}")
end
def self.is_keg_installed?(keg)
`#{BIN} list | grep -w '#{keg}'`
system("#{BIN} list | grep -w '#{keg}' >& /dev/null")
end
def self.is_cask_installed?(cask)
`#{BIN} cask list | grep -w '#{cask}'`
system("#{BIN} cask list | grep -w '#{cask}' >& /dev/null")
end
def self.is_tapped?(tap)
`#{BIN} tap | grep -w '#{tap}'`
system("#{BIN} tap | grep -w '#{tap}' >& /dev/null")
end
def self.is_installed?

View file

@ -2,7 +2,7 @@
require_relative 'lib/output'
task :osx do
if `defaults read com.apple.finder _FXShowPosixPathInTitle | grep 1`
if system('defaults read com.apple.finder _FXShowPosixPathInTitle >&/dev/null')
echo 'OSX settings already applied!'
next
end