lib/specinfra/command_factory.rb in specinfra-2.43.5 vs lib/specinfra/command_factory.rb in specinfra-2.43.6

- old
+ new

@@ -49,10 +49,14 @@ if command_class.nil? ||( (command_class < Specinfra::Command::Base).nil? && (command_class < Specinfra::Command::Windows::Base).nil? ) command_class = base_class.const_get(resource_type.to_camel_case) end - command_class.create + begin + command_class.create(@os_info) + rescue ArgumentError + command_class.create + end end def breakdown(meth) # Somtimes `selinux_module' type matches `selinux' and error occurs. # Reverse sorting is needed to avoid this problem.