Permalink
Browse files

User defaults keys and values can include space characters

  • Loading branch information...
1 parent 9ba3096 commit 32f9a3316a958f73e69f00d79e2476b566963c9e @sax sax committed Nov 27, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 providers/userdefaults.rb
@@ -39,9 +39,9 @@ def load_current_resource
unless @userdefaults.is_set
cmd = "#{'sudo' if new_resource.sudo} defaults write #{new_resource.domain} "
cmd << "-g " if new_resource.global
- cmd << "#{new_resource.key} " if new_resource.key
+ cmd << "'#{new_resource.key}' " if new_resource.key
cmd << "-#{new_resource.type} " if new_resource.type
- cmd << new_resource.value
+ cmd << "'#{new_resource.value}'"
execute cmd
end
end

0 comments on commit 32f9a33

Please sign in to comment.