JAL-2119 pass/resolve real help dir in link checker
[jalview.git] / utils / HelpLinksChecker.java
index 5ba9097..a0853a9 100644 (file)
@@ -85,7 +85,7 @@ public class HelpLinksChecker
   void checkLinks(String helpDirectoryPath) throws IOException
   {
     System.out.println("Checking help file links");
-    File helpFolder = new File(helpDirectoryPath);
+    File helpFolder = new File(helpDirectoryPath).getCanonicalFile();
     if (!helpFolder.exists())
     {
       System.out.println("Can't find " + helpDirectoryPath);
@@ -207,7 +207,11 @@ public class HelpLinksChecker
       System.out
               .println("External links not verified as internet not available");
     }
-
+    if (invalidInternalHrefCount > 0 || invalidExternalHrefCount > 0
+            || invalidImageCount > 0 || invalidAnchorRefCount > 0)
+    {
+      System.exit(1);
+    }
   }
 
   /**