Skip to content
Browse files

Merge pull request #13 from jeroenj/booleans

Booleans should be correctly recognized in userdefaults
  • Loading branch information...
2 parents 554ce45 + 6f519cc commit 92f7a0db95e43acd2a07e1cc7018ee8721afdbcd @jtimberman jtimberman committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 providers/userdefaults.rb
View
4 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 92f7a0d

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