21494: Run linkchecker task unconditionally
[arvados.git] / doc / Rakefile
index 6b1b0d2ac3c0aaef1f77d831020d3e7bf58df4dd..c4e26cfb3b47eb78d2600057c1bab157a8858a6e 100644 (file)
@@ -195,15 +195,16 @@ file "sdk/java-v2/javadoc/index.html" do |t|
 end
 
 task :linkchecker => [ :generate ] do
-  if !can_run?("linkchecker", "--version")
-    puts "Warning: linkchecker not found, skipping run".colorize(:light_red)
-    next
-  end
   # we need --check-extern to check relative links, weird but true
-  system(
+  result = system(
     "linkchecker", "index.html", "--check-extern", "--ignore-url=!file://",
     chdir: ".site",
-  ) or exit $?.exitstatus
+  )
+  if result.nil?
+    fail "could not run linkchecker command (is it installed?)"
+  elsif !result
+    fail "linkchecker exited #{$?.exitstatus}"
+  end
 end
 
 task :import_vscode_training do