Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 0.5.1, 0.5.2
-
Fix Version/s: 0.5.4
-
Component/s: None
-
Labels:None
Description
Because LoadError isn't an Exception, the code block for handling it never catches it.
>> LoadError.is_a?Exception
=> false
if @new_resource.password
begin
require 'shadow'
rescue Exception => e
Chef::Log.error("You must have ruby-shadow installed for password support!")
raise Chef::Exception::MissingLibrary, "You must have ruby-shadow installed for password support!"
end
shadow_info = Shadow::Passwd.getspnam(@new_resource.username)
@current_resource.password(shadow_info.sp_pwdp)
end
should be rescue LoadError ![]()
Pull req sent, fix at http://github.com/fujin/chef/tree/chef-82