clarified errors;
authorwenzelm
Sat, 10 Oct 2020 21:12:20 +0200
changeset 72425 d0937d55eb90
parent 72424 10c07d224035
child 72426 f5d60c12deeb
clarified errors;
src/Pure/Admin/build_csdp.scala
src/Pure/System/mingw.scala
--- a/src/Pure/Admin/build_csdp.scala	Sat Oct 10 21:04:49 2020 +0200
+++ b/src/Pure/Admin/build_csdp.scala	Sat Oct 10 21:12:20 2020 +0200
@@ -193,7 +193,7 @@
 
   Options are:
     -D DIR       target directory (default ".")
-    -M DIR       msys/mingw root directory (for Windows)
+    -M DIR       msys/mingw root specification for Windows
     -U URL       download URL
                  (default: """" + default_download_url + """")
     -v           verbose
--- 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) }
     }
   }
 }