From ed4c6513c01ec6a624c22a21dd42734c24d35e1f Mon Sep 17 00:00:00 2001 From: ยท๐‘‘๐‘ด๐‘•๐‘‘๐‘ฉ๐‘ค Date: Sun, 14 Dec 2025 05:56:03 +0000 Subject: list-stale command --- bin/cmd.ml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'bin/cmd.ml') diff --git a/bin/cmd.ml b/bin/cmd.ml index 6a2966d..a411f43 100644 --- a/bin/cmd.ml +++ b/bin/cmd.ml @@ -301,6 +301,28 @@ module Lock = struct let cmd ~env = Cmdliner.Cmd.v info (term ~env) end +module List_stale = struct + let info = + Cmdliner.Cmd.info + "list-stale" + ~doc: "List stale inputs with latest-cmd, without refreshing" + ~man: common_man + + let run ~env ~domain_count : unit = + match Nixtamal.list_stale ~env ~domain_count with + | Ok() -> () + | Error err -> failwith (Fmt.str "%a" Nixtamal.Error.pp_error err) + + let term ~env = + let open Cmdliner in + Term.( + const (fun glb -> Global.run ~env glb @@ run) + $ Global.args + ) + + let cmd ~env = Cmdliner.Cmd.v info (term ~env) +end + module Refresh = struct let info = Cmdliner.Cmd.info -- cgit v1.2.3