Fix datastore to validate options w/o a default
Options without a default were not pulled into the `@options` hash and therefore were not used to validate options on assignment. I am not entirely sure how this fix works, since it would seem that non-override options would not get pulled in if an option was first set in the global datastore. However, a previous value does not get overridden and new values are validated. Anything further is merely speculation on my part.bug/bundler_fix
parent
5c163960ed
commit
22df7c0071
|
@ -75,8 +75,7 @@ class DataStore < Hash
|
|||
#
|
||||
def import_options(options, imported_by = nil, overwrite = false)
|
||||
options.each_option do |name, opt|
|
||||
# Skip options without a default or if is already a value defined
|
||||
if !opt.default.nil? && (self[name].nil? || overwrite)
|
||||
if self[name].nil? || overwrite
|
||||
import_option(name, opt.default, true, imported_by, opt)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue