Report when users' ~/.domtool directories are unreadable
[hcoop/domtool2.git] / src / main.sml
index feaab16..eaee4fc 100644 (file)
@@ -33,7 +33,8 @@ fun check' G fname =
        if !ErrorMsg.anyErrors then
            G
        else
-           Tycheck.checkFile G (Defaults.tInit ()) prog
+           (Option.app (Unused.check G) (#3 prog);
+            Tycheck.checkFile G (Defaults.tInit ()) prog)
     end
 
 fun basis () =
@@ -87,7 +88,8 @@ fun check fname =
                        if !ErrorMsg.anyErrors then
                            raise ErrorMsg.Error
                        else
-                           (G', #3 prog)
+                           (Option.app (Unused.check b) (#3 prog);
+                            (G', #3 prog))
                    end
            end
     end
@@ -1024,8 +1026,11 @@ fun regenerateEither tc checker context =
                            ();
                        app checker files
                    end
+               else if String.isSuffix "_admin" user then
+                   ()    
                else
-                   ()
+                   (print ("Couldn't access " ^ user ^ "'s ~/.domtool directory.\n");
+                    ok := false)
            end
            handle IO.Io {name, function, ...} =>
                   (print ("IO error processing user " ^ user ^ ": " ^ function ^ ": " ^ name ^ "\n");