]> git.pld-linux.org Git - packages/chef.git/blame - optional-plist.patch
do not require plist when not using the feature
[packages/chef.git] / optional-plist.patch
CommitLineData
fce4f0b8
ER
1--- chef-11.14.6/lib/chef/provider/user/dscl.rb~ 2014-12-05 12:56:20.000000000 +0200
2+++ chef-11.14.6/lib/chef/provider/user/dscl.rb 2014-12-05 13:04:42.684470417 +0200
3@@ -19,7 +19,6 @@
4 require 'mixlib/shellout'
5 require 'chef/provider/user'
6 require 'openssl'
7-require 'plist'
8
9 class Chef
10 class Provider
11@@ -125,6 +124,8 @@
12
13 # Calling shell_out directly since we want to give an input stream
14 shadow_hash_xml = convert_binary_plist_to_xml(shadow_hash_binary.string)
15+
16+ require 'plist'
17 shadow_hash = Plist::parse_xml(shadow_hash_xml)
18
19 if shadow_hash["SALTED-SHA512"]
20@@ -558,6 +559,7 @@
21 begin
22 user_plist_file = "#{USER_PLIST_DIRECTORY}/#{@new_resource.username}.plist"
23 user_plist_info = run_plutil("convert xml1 -o - #{user_plist_file}")
24+ require 'plist'
25 user_info = Plist::parse_xml(user_plist_info)
26 rescue Chef::Exceptions::PlistUtilCommandFailed
27 end
28@@ -571,6 +573,7 @@
29 #
30 def save_user_info(user_info)
31 user_plist_file = "#{USER_PLIST_DIRECTORY}/#{@new_resource.username}.plist"
32+ require 'plist'
33 Plist::Emit.save_plist(user_info, user_plist_file)
34 run_plutil("convert binary1 #{user_plist_file}")
35 end
This page took 0.025549 seconds and 4 git commands to generate.