Print error and exit if we can't get commit id

This commit is contained in:
Reynir Björnsson 2023-02-08 16:30:30 +01:00
parent 8c7e71127f
commit adf6564385

View file

@ -715,7 +715,10 @@ module Make
let commit_id git_kv =
Store.digest git_kv Mirage_kv.Key.empty >|= fun r ->
Result.get_ok r
Result.fold r ~ok:Fun.id
~error:(fun e ->
Logs.err (fun m -> m "%a" Store.pp_error e);
exit 2)
let repo commit =
let upstream = List.hd (String.split_on_char '#' (Key_gen.remote ())) in