Use Doctor#healthy? and ensure _all_ items are checked before process quits.
This commit is contained in:
parent
7d26be5102
commit
8b8fa4da4e
|
@ -6,18 +6,18 @@ module Jekyll
|
||||||
site = Jekyll::Site.new(options)
|
site = Jekyll::Site.new(options)
|
||||||
site.read
|
site.read
|
||||||
|
|
||||||
if unhealthy(site)
|
if healthy?(site)
|
||||||
abort
|
|
||||||
else
|
|
||||||
Jekyll.logger.info "Your test results", "are in. Everything looks fine."
|
Jekyll.logger.info "Your test results", "are in. Everything looks fine."
|
||||||
|
else
|
||||||
|
abort
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def unhealthy(site)
|
def healthy?(site)
|
||||||
[
|
[
|
||||||
deprecated_relative_permalinks(site),
|
!deprecated_relative_permalinks(site),
|
||||||
conflicting_urls(site)
|
!conflicting_urls(site)
|
||||||
].any?
|
].all?
|
||||||
end
|
end
|
||||||
|
|
||||||
def deprecated_relative_permalinks(site)
|
def deprecated_relative_permalinks(site)
|
||||||
|
|
Loading…
Reference in New Issue