Gracefully handle the 'garbage in' of an empty .foreman file.

This commit is contained in:
Nick Zadrozny
2011-06-03 15:48:13 -05:00
parent fd234b8044
commit f4b1e3701b
+1 -1
View File
@@ -86,7 +86,7 @@ private ######################################################################
def options
original_options = super
return original_options unless File.exists?(".foreman")
defaults = YAML::load_file(".foreman")
defaults = YAML::load_file(".foreman") || {}
Thor::CoreExt::HashWithIndifferentAccess.new(defaults.merge(original_options))
end