Skip to content
Browse files

Fixing plists, fixing noise brew output when brew has not been instal…

…led yet
  • Loading branch information...
1 parent ed098e2 commit ed0d95b3755167747de466541a194516feab2a82 pivotal committed Jul 24, 2012
Showing with 6 additions and 7 deletions.
  1. +2 −2 definitions/brew.rb
  2. +2 −3 libraries/brew.rb
  3. +1 −1 recipes/keyboard_preferences.rb
  4. +1 −1 recipes/textmate_preferences.rb
View
4 definitions/brew.rb
@@ -5,10 +5,10 @@
case params[:action]
when :install
- outdated = system("brew outdated | grep -q #{package}")
+ outdated = system("brew outdated 2>/dev/null | grep -q #{package}")
Chef::Log.debug("brew package #{package} " + (outdated ? "IS" : "IS NOT") + " outdated.")
- multiple_versions_installed = system("brew list #{package} | grep -q '#{package} has multiple installed versions'")
+ multiple_versions_installed = system("brew list #{package} 2>/dev/null | grep -q '#{package} has multiple installed versions'")
Chef::Log.debug("brew package #{package} " + (multiple_versions_installed ? "HAS" : "does NOT HAVE") + " multiple versions.")
already_installed = brew_installed?(package)
View
5 libraries/brew.rb
@@ -8,14 +8,13 @@ def brew_install(package, opts={})
def brew_installed?(package)
include_recipe "pivotal_workstation::homebrew"
-
- installed=(system("brew list #{package} > /dev/null") || brew_has_multiple_versions_installed?(package))
+ installed=(system("brew list #{package} > /dev/null 2>&1") || brew_has_multiple_versions_installed?(package))
Chef::Log.debug("brew package #{package} " + (installed ? "IS" : "IS NOT") + " installed.")
installed
end
def brew_has_multiple_versions_installed?(package)
- multiple=system("brew list #{package} | grep -q '#{package} has multiple installed versions'")
+ multiple=system("brew list #{package} 2>/dev/null | grep -q '#{package} has multiple installed versions'")
Chef::Log.debug("brew package #{package} " + (multiple ? "HAS" : "does NOT HAVE") + " multiple versions.")
multiple
end
View
2 recipes/keyboard_preferences.rb
@@ -1,6 +1,6 @@
pivotal_workstation_defaults "Enable full keyboard access for all controls" do
# from http://knoopx.net/2011/10/28/os-x-lion-tweaks
- plist "NSGlobalDomain"
+ domain "NSGlobalDomain"
key "AppleKeyboardUIMode"
integer 3
end
View
2 recipes/textmate_preferences.rb
@@ -6,7 +6,7 @@
boolean true
end
-execute "show line numbers" do
+pivotal_workstation_defaults "show line numbers" do
domain '~/Library/Preferences/com.macromates.textmate'
key 'OakTextViewLineNumbersEnabled'
boolean true

0 comments on commit ed0d95b

Please sign in to comment.
Something went wrong with that request. Please try again.