proper error message for missing elm component;
authorFabian Huch <huch@in.tum.de>
Wed, 05 Feb 2025 14:56:39 +0100
changeset 82105 1609068d3f5a
parent 82104 90e10664e9f7
child 82106 27acc91b3fbf
proper error message for missing elm component;
src/Tools/Find_Facts/src/elm.scala
--- a/src/Tools/Find_Facts/src/elm.scala	Wed Feb 05 10:29:39 2025 +0100
+++ b/src/Tools/Find_Facts/src/elm.scala	Wed Feb 05 14:56:39 2025 +0100
@@ -18,6 +18,11 @@
 
 
 object Elm {
+  def elm_home: Path = {
+    Path.explode(proper_string(Isabelle_System.getenv("ISABELLE_ELM_HOME"))
+      getOrElse error("No elm component found"))
+  }
+
   object Project {
     def apply(
       name: String,
@@ -71,7 +76,7 @@
         progress.echo("Building web application " + output.absolute + " ...")
 
         val cmd =
-          File.bash_path(Path.explode("$ISABELLE_ELM_HOME/elm")) + " make " +
+          File.bash_path(elm_home + Path.basic("elm")) + " make " +
             File.bash_path(main) + " --optimize --output=" + output
         val res = Isabelle_System.bash(cmd, cwd = dir)