Resource: set version to nil if version is null
Is this the right fix? This fixes version cascading from the parent.
This commit is contained in:
parent
d32a1c4c7d
commit
4e3d23ad14
@ -145,7 +145,10 @@ class Resource
|
||||
end
|
||||
|
||||
def version(val = nil)
|
||||
@version ||= detect_version(val)
|
||||
@version ||= begin
|
||||
version = detect_version(val)
|
||||
version.null? ? nil : version
|
||||
end
|
||||
end
|
||||
|
||||
def mirror(val)
|
||||
@ -155,7 +158,7 @@ class Resource
|
||||
private
|
||||
|
||||
def detect_version(val)
|
||||
return if val.nil? && url.nil?
|
||||
return Version::NULL if val.nil? && url.nil?
|
||||
|
||||
case val
|
||||
when nil then Version.detect(url, specs)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user