1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-22 15:27:02 +00:00

chasquid-util: switch --configdir into --config_dir and deprecate --configdir

There's an inconsistency between chasquid (which uses `--config_dir`) and
chasquid-util (which uses `--configdir`).

That is prone to cause confusion, so this patch renames chasquid-util's
flag, leaving the old one as deprecated with a warning message.

Closes https://github.com/albertito/chasquid/pull/60.

Amended-by: Alberto Bertogli <albertito@blitiri.com.ar>
  Added test case for the deprecated option, adjusted commit message.
This commit is contained in:
Albert ARIBAUD
2025-03-21 15:02:03 +01:00
committed by Alberto Bertogli
parent e5e7256d3e
commit fa074ec16c
6 changed files with 39 additions and 14 deletions

View File

@@ -1,21 +1,21 @@
# Unknown argument.
c = ./chasquid-util --configdir=.config blahrarghar
c = ./chasquid-util --config_dir=.config blahrarghar
c <- Unknown argument "blahrarghar"
c wait 1
c = ./chasquid-util --configdir=.nonono check-userdb
c = ./chasquid-util --config_dir=.nonono check-userdb
c <- Error: file ".nonono/domains//users" does not exist
c wait 1
c = ./chasquid-util --configdir=.nonono print-config
c = ./chasquid-util --config_dir=.nonono print-config
c <- Error loading config: failed to read config at ".nonono/chasquid.conf": open .nonono/chasquid.conf: no such file or directory
c wait 1
c = ./chasquid-util --configdir=.nonono aliases-resolve email@addr
c = ./chasquid-util --config_dir=.nonono aliases-resolve email@addr
c <- Error loading config: failed to read config at ".nonono/chasquid.conf": open .nonono/chasquid.conf: no such file or directory
c wait 1
c = ./chasquid-util --configdir=.nonono domaininfo-remove domain
c = ./chasquid-util --config_dir=.nonono domaininfo-remove domain
c <- Error loading config: failed to read config at ".nonono/chasquid.conf": open .nonono/chasquid.conf: no such file or directory
c wait 1