lib/facter/util/loader.rb in facter-1.5.6 vs lib/facter/util/loader.rb in facter-1.5.7

- old
+ new

@@ -67,10 +67,14 @@ end end def load_file(file) # We have to specify Kernel.load, because we have a load method. - Kernel.load(file) + begin + Kernel.load(file) + rescue ScriptError => detail + warn "Error loading fact #{file} #{detail}" + end end # Load facts from the environment. If no name is provided, # all will be loaded. def load_env(fact = nil)