Reword bridge detection error message

This commit is contained in:
Reynir Björnsson 2020-11-30 11:54:42 +01:00
parent b4a4a28634
commit 353284bd49

View file

@ -236,6 +236,7 @@ let bridge_exists bridge_name =
| Linux -> Bos.Cmd.(v "ip" % "link" % "show" % bridge_name)
in
Bos.OS.Cmd.(run_out ~err:err_null cmd |> out_null |> success)
|> R.reword_error (fun _e -> R.msgf "interface %s does not exist" bridge_name)
let bridges_exist bridges =
List.fold_left