Skip to content

Commit f0cbc6f

Browse files
committed
Add message to Option unwrapping
1 parent fa65513 commit f0cbc6f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib/mina_lib/mina_lib.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2923,7 +2923,10 @@ module Hardfork_config = struct
29232923
~target_dir ~ledger_name_prefix root =
29242924
let open Deferred.Or_error.Let_syntax in
29252925
let root_hash = get_root_hash root in
2926-
let ledger_dirname = get_directory root |> Option.value_exn in
2926+
let ledger_dirname =
2927+
get_directory root
2928+
|> Option.value_exn ~message:"Root ledger must have a directory"
2929+
in
29272930
let%bind tar_path =
29282931
Genesis_ledger_helper.Ledger.generate_tar ~logger ~target_dir
29292932
~ledger_name_prefix ~root_hash ~ledger_dirname ()

0 commit comments

Comments
 (0)