Skip to content

Commit

Permalink
check for tarix up front
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack Feser committed Jan 28, 2022
1 parent 3a6b4fa commit 68c15b2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 68c15b2

Please sign in to comment.