From 8b8fa4da4e96e184a88376cc9b8f76c37be17c13 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 17 Aug 2013 15:16:14 -0400 Subject: [PATCH] Use Doctor#healthy? and ensure _all_ items are checked before process quits. --- lib/jekyll/commands/doctor.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/jekyll/commands/doctor.rb b/lib/jekyll/commands/doctor.rb index 8aca65c7..7ebab903 100644 --- a/lib/jekyll/commands/doctor.rb +++ b/lib/jekyll/commands/doctor.rb @@ -6,18 +6,18 @@ module Jekyll site = Jekyll::Site.new(options) site.read - if unhealthy(site) - abort - else + if healthy?(site) Jekyll.logger.info "Your test results", "are in. Everything looks fine." + else + abort end end - def unhealthy(site) + def healthy?(site) [ - deprecated_relative_permalinks(site), - conflicting_urls(site) - ].any? + !deprecated_relative_permalinks(site), + !conflicting_urls(site) + ].all? end def deprecated_relative_permalinks(site)