Browse files

fix install command for bash

  • Loading branch information...
1 parent a5aaf0c commit 5f89182ece03704e4cc0be78ae23fb513201f2ef Neil Bakhle committed Oct 12, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 cookbooks/homebrew/providers/homebrew.rb
View
2 cookbooks/homebrew/providers/homebrew.rb
@@ -20,7 +20,7 @@ def load_current_resource
end
def install_package(name, version)
- run_brew_command("if [ brew info #{name} | grep -q \"Not installed\" -eq 0 ]; then /usr/bin/env HOMEBREW_TEMP=#{PREFIX}/tmp #{HOMEBREW} install #{name}; fi")
+ run_brew_command("brew info #{name} | grep -q \"Not installed\"; if [ $? -eq 0 ]; then /usr/bin/env HOMEBREW_TEMP=#{PREFIX}/tmp #{HOMEBREW} install #{name}; fi")
end
def remove_package(name, version)

0 comments on commit 5f89182

Please sign in to comment.