src/Pure/System/mingw.scala
changeset 72425 d0937d55eb90
parent 72424 10c07d224035
child 72427 def95a34df8e
--- a/src/Pure/System/mingw.scala	Sat Oct 10 21:04:49 2020 +0200
+++ b/src/Pure/System/mingw.scala	Sat Oct 10 21:12:20 2020 +0200
@@ -38,15 +38,15 @@
 
   def get_root: Path =
     if (!Platform.is_windows) error("Windows platform required")
-    else if (root.isEmpty) error("Windows platform needs specification of msys root directory")
+    else if (root.isEmpty) error("Windows platform requires msys/mingw root specification")
     else root.get
 
   def check
   {
     if (Platform.is_windows) {
       get_root
-      val result = Isabelle_System.bash(bash_command("uname -s")).check
-      if (!result.out.startsWith("MSYS")) error("Bad msys installation " + get_root)
+      try { require(Isabelle_System.bash(bash_command("uname -s")).check.out.startsWith("MSYS")) }
+      catch { case ERROR(_) => error("Bad msys/mingw installation " + get_root) }
     }
   }
 }