Skip to content

Commit

Permalink
fix(cram): improve error message on sh unavailable (#10978)
Browse files Browse the repository at this point in the history
* fix(cram): improve error message on sh unavailable

Signed-off-by: Etienne Marais <[email protected]>
  • Loading branch information
maiste authored Sep 30, 2024
1 parent 9f3cda7 commit 63fac22
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/dune_rules/cram/cram_exec.ml
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,10 @@ let run ~env ~script lexbuf : string Fiber.t =
let+ () =
let sh =
let path = Env_path.path Env.initial in
Option.value_exn (Bin.which ~path "sh")
match Bin.which ~path "sh" with
| Some sh -> sh
| None ->
User_error.raise [ Pp.text "CRAM test aborted, \"sh\" can not be found in PATH" ]
in
let metadata =
let name =
Expand Down

0 comments on commit 63fac22

Please sign in to comment.