cli: Default to "config.toml" as config file

This is expected to run through a systemd system service, with the
config file explicitly specified. Using XDG for the default config makes
little sense in that case, and ends up causing issues with a strict
systemd service file.

Signed-off-by: Gergely Nagy <me@gergo.csillger.hu>
This commit is contained in:
Gergely Nagy 2025-01-16 12:24:16 +01:00
parent 9658f95ac3
commit a01cb16ae0
No known key found for this signature in database
3 changed files with 1 additions and 14 deletions

7
Cargo.lock generated
View file

@ -765,7 +765,6 @@ dependencies = [
"tower-http",
"tracing",
"tracing-subscriber",
"xdg",
]
[[package]]
@ -1720,12 +1719,6 @@ dependencies = [
"memchr",
]
[[package]]
name = "xdg"
version = "2.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546"
[[package]]
name = "yansi"
version = "1.0.1"

View file

@ -31,7 +31,6 @@
tower-http = { version = "0.6.2", features = ["trace"] }
tracing = "0.1.41"
tracing-subscriber = { version = "0.3.19", features = ["json", "env-filter"] }
xdg = "2.5.2"
[features]
tokio-console = ["dep:console-subscriber", "tokio/tracing"]

View file

@ -15,11 +15,6 @@ pub struct Args {
impl Args {
fn xdg_config_file() -> String {
xdg::BaseDirectories::with_prefix("iocaine")
.unwrap()
.place_config_file("config.toml")
.expect("cannot create configuration directory")
.display()
.to_string()
"config.toml".to_string()
}
}