daemon bin: a more helpful error message on unknown arguments.

This commit is contained in:
Antoine Poinsot 2023-08-10 11:43:47 +02:00
parent 5b6c2b5c43
commit 222c8bba81
No known key found for this signature in database
GPG Key ID: E13FC145CD3F4304

View File

@ -13,8 +13,9 @@ fn parse_args(args: Vec<String>) -> Option<PathBuf> {
}
if args.len() != 3 {
eprintln!("Unknown arguments '{:?}'.", args);
eprintln!("Only '--conf <configuration file path>' is supported.");
eprintln!("A TOML configuration file is required to run lianad. By default lianad looks for a 'config.toml' file in its data directory. A different one may be provided like so: '--conf <config file path>'.");
eprintln!("A documented example of the configuration file is available at https://github.com/wizardsardine/liana/blob/607c0abddab2ff5761b371c6020b0793b1a1bc97/contrib/lianad_config_example.toml.");
eprintln!("The default data directory path is a 'liana/' folder in the XDG standard configuration directory for all OSes but Linux ones, where it's '~/.liana/'.");
process::exit(1);
}