Merge pull request #34 from nz/empty-foreman-file
Gracefully handle the 'garbage in' of an empty .foreman file.
This commit is contained in:
+1
-1
@@ -86,7 +86,7 @@ private ######################################################################
|
|||||||
def options
|
def options
|
||||||
original_options = super
|
original_options = super
|
||||||
return original_options unless File.exists?(".foreman")
|
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))
|
Thor::CoreExt::HashWithIndifferentAccess.new(defaults.merge(original_options))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user