From 68c15b223b636adc63e5b0038f3f4d375da1a3c6 Mon Sep 17 00:00:00 2001 From: Jack Feser Date: Fri, 28 Jan 2022 11:14:40 -0500 Subject: [PATCH] check for tarix up front --- bin/main.ml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/main.ml b/bin/main.ml index f0cd19c..51a4424 100644 --- a/bin/main.ml +++ b/bin/main.ml @@ -400,7 +400,14 @@ let compress_docset docset_dir = cp temp_tgz (docset_dir / "Contents/Resources/tarix.tgz"); cp temp_db (docset_dir / "Contents/Resources/docSet.dsidx") +let check_for_tarix () = + if Option.is_none @@ which "tarix" then ( + Logs.err (fun m -> m "Could not find tarix. Compression is not available."); + exit 1) + let main () compress theme output_path pkg_names = + if compress then check_for_tarix (); + (* Get Odig configuration. *) let all_pkgs = Odig.all_pkgs () in