Permalink
Browse files

read booleans should also be recognized in userdefaults

  • Loading branch information...
1 parent 554ce45 commit 6f519cc051ee52352a7ef38b9768a41f3e2f3804 @jeroenj jeroenj committed Feb 27, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 providers/userdefaults.rb
@@ -26,8 +26,8 @@ def load_current_resource
@userdefaults.key(new_resource.key)
@userdefaults.domain(new_resource.domain)
Chef::Log.debug("Checking #{new_resource.domain} value")
- truefalse = 1 if ['TRUE','1','true','YES','yes'].include?(new_resource.value)
- truefalse = 0 if ['FALSE','0','false','NO','no'].include?(new_resource.value)
+ truefalse = 1 if [true, 'TRUE','1','true','YES','yes'].include?(new_resource.value)
+ truefalse = 0 if [false, 'FALSE','0','false','NO','no'].include?(new_resource.value)
drcmd = "defaults read #{new_resource.domain} "
drcmd << "-g " if new_resource.global
drcmd << "#{new_resource.key} " if new_resource.key

0 comments on commit 6f519cc

Please sign in to comment.