strict shasum: this is used on input files;
authorwenzelm
Sun, 11 Jul 2021 20:47:55 +0200
changeset 74226 c9771e1b3223
parent 74225 59b6f0462086
child 74227 f6862d5f4e7f
strict shasum: this is used on input files;
src/Tools/Setup/isabelle/setup/Build.java
--- a/src/Tools/Setup/isabelle/setup/Build.java	Sun Jul 11 16:57:30 2021 +0200
+++ b/src/Tools/Setup/isabelle/setup/Build.java	Sun Jul 11 20:47:55 2021 +0200
@@ -165,7 +165,11 @@
         public String shasum(String file)
             throws IOException, NoSuchAlgorithmException, InterruptedException
         {
-            return shasum(file, List.of(path(file)));
+            Path path = path(file);
+            if (Files.exists(path)) { return shasum(file, List.of(path)); }
+            else {
+                throw new RuntimeException("Missing input file " + Environment.quote(path.toString()));
+            }
         }
     }