--- a/src/Pure/System/isabelle_system.scala Mon Oct 12 15:58:37 2020 +0200
+++ b/src/Pure/System/isabelle_system.scala Mon Oct 12 16:19:11 2020 +0200
@@ -375,9 +375,16 @@
else error("Expected to find GNU tar executable")
}
+ def require_command(cmds: String*)
+ {
+ for (cmd <- cmds) {
+ if (!bash(Bash.string(cmd) + " --version").ok) error("Missing command: " + quote(cmd))
+ }
+ }
+
private lazy val curl_check: Unit =
- try { bash("curl --version").check }
- catch { case ERROR(_) => error("Cannot download files: missing curl") }
+ try { require_command("curl") }
+ catch { case ERROR(msg) => error(msg + " --- cannot download files") }
def download(url: String, file: Path, progress: Progress = new Progress): Unit =
{