summaryrefslogtreecommitdiff
path: root/src/vycli.ml
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2024-10-23 18:50:46 -0500
committerJohn Estabrook <jestabro@vyos.io>2024-10-27 20:50:41 -0500
commit5d7927e392e70436aaca1f8261e5d4ab8e4ec8f8 (patch)
treed824589851f788ab4864c31b44ec6cbab2f5cefe /src/vycli.ml
parentdd9271b4304c6b1a5a2576821d1b2b8fd3aa6bf5 (diff)
downloadvyconf-5d7927e392e70436aaca1f8261e5d4ab8e4ec8f8.tar.gz
vyconf-5d7927e392e70436aaca1f8261e5d4ab8e4ec8f8.zip
T6718: update build system, drop batteries, and adjust for lib changes
Update as needed for use with contemporary vyos1x-config: . update build system to use dune . drop use of batteries . update for protoc breaking changes in versions >= 3.0 . remove files now in vyos1x-config (config_tree et. al.; parsing)
Diffstat (limited to 'src/vycli.ml')
-rw-r--r--src/vycli.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vycli.ml b/src/vycli.ml
index e00a4e3..6c1ed0c 100644
--- a/src/vycli.ml
+++ b/src/vycli.ml
@@ -60,7 +60,7 @@ let main socket op path out_format config_format =
begin
match resp.status with
| Success -> Ok "" |> Lwt.return
- | _ -> Error (BatOption.default "" resp.error) |> Lwt.return
+ | _ -> Error (Option.value resp.error ~default:"") |> Lwt.return
end
| OpSetupSession ->
let%lwt resp = setup_session client "vycli" in
@@ -81,7 +81,7 @@ let main socket op path out_format config_format =
| Error e -> let%lwt () = Lwt_io.write Lwt_io.stderr (Printf.sprintf "%s\n" e) in Lwt.return 1
let _ =
- let () = Arg.parse args (fun f -> ()) usage in
+ let () = Arg.parse args (fun _ -> ()) usage in
let path = String.trim !path_opt |> Pcre.split ~pat:"\\s+" in
let out_format = output_format_of_string !out_format_opt in
let config_format = config_format_of_string !conf_format_opt in