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 end
def self.has_keg?(keg) def self.has_keg?(keg)
`#{BIN} search #{keg}` system("#{BIN} search #{keg}")
end end
def self.is_keg_installed?(keg) def self.is_keg_installed?(keg)
`#{BIN} list | grep -w '#{keg}'` system("#{BIN} list | grep -w '#{keg}' >& /dev/null")
end end
def self.is_cask_installed?(cask) def self.is_cask_installed?(cask)
`#{BIN} cask list | grep -w '#{cask}'` system("#{BIN} cask list | grep -w '#{cask}' >& /dev/null")
end end
def self.is_tapped?(tap) def self.is_tapped?(tap)
`#{BIN} tap | grep -w '#{tap}'` system("#{BIN} tap | grep -w '#{tap}' >& /dev/null")
end end
def self.is_installed? def self.is_installed?

View file

@ -2,7 +2,7 @@
require_relative 'lib/output' require_relative 'lib/output'
task :osx do 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!' echo 'OSX settings already applied!'
next next
end end