diff options
-rw-r--r-- | lib/chef/provider/user/dscl.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/chef/provider/user/dscl.rb b/lib/chef/provider/user/dscl.rb index 0726b08ded..0c0c85e18b 100644 --- a/lib/chef/provider/user/dscl.rb +++ b/lib/chef/provider/user/dscl.rb @@ -652,7 +652,11 @@ user password using shadow hash.") def run_plutil(*args) result = shell_out("plutil -#{args.join(' ')}") raise(Chef::Exceptions::PlistUtilCommandFailed,"plutil error: #{result.inspect}") unless result.exitstatus == 0 - result.stdout + if result.stdout.encoding == Encoding::ASCII_8BIT + result.stdout.encode("utf-8", "binary", :undef => :replace, :invalid => :replace, :replace => '?') + else + result.stdout + end end def convert_binary_plist_to_xml(binary_plist_string) |