From 45a653d949ce174d2c19c6444ba2c60f8fb6d737 Mon Sep 17 00:00:00 2001 From: orbifx Date: Thu, 17 Nov 2022 19:22:23 +0000 Subject: [PATCH] Improve pubdir parameter reporting --- cli/publish.ml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/publish.ml b/cli/publish.ml index 08d6465..51106af 100644 --- a/cli/publish.ml +++ b/cli/publish.ml @@ -9,13 +9,13 @@ open Logarion let publish pubdir ids = let kv = Logarion.File_store.of_kv_file () in let predicate t = List.mem t.Text.id ids in - let pubdir = match pubdir with Some d -> d | None -> - try Logarion.Store.KV.find "Pubdir" kv with Not_found -> - try Sys.getenv "txtpubdir" with Not_found -> "" + let pubdir_source, pubdir = match pubdir with Some d -> "--pubdir ", d | None -> + try "txt.conf:Pubdir", Logarion.Store.KV.find "Pubdir" kv with Not_found -> + try "$txtpubdir", Sys.getenv "txtpubdir" with Not_found -> "$txtpubdir", "" in let targets = targets pubdir in if targets = [] then - Printf.eprintf "No target directories in $pubdir='%s'\n" pubdir + Printf.eprintf "No target directories in %s='%s'\n" pubdir_source pubdir else begin let pub_dirs = List.map (fun x -> snd x) targets in File_store.iter ~predicate (fun (_t, p) ->