diff --git a/Cargo.toml b/Cargo.toml index 7450232..2b0df9d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,6 +28,7 @@ udp-stream = "0.0.12" uuid = { version = "1.8", features = ["serde"] } validator = "0.18.1" thiserror = "1.0.61" +shellexpand = "3.1" [build-dependencies] vergen-gix = { version = "1.0.0-beta.2", default-features = false, features = ["build", "cargo"] } diff --git a/src/cli/manager.rs b/src/cli/manager.rs index 32043e2..da8a2af 100644 --- a/src/cli/manager.rs +++ b/src/cli/manager.rs @@ -82,11 +82,14 @@ pub fn is_enable_auto_create() -> bool { } pub fn log_path() -> String { - MANAGER - .clap_matches - .log_path - .clone() - .expect("Clap arg \"log-path\" should always be \"Some(_)\" because of the default value.") + let log_path = + MANAGER.clap_matches.log_path.clone().expect( + "Clap arg \"log-path\" should always be \"Some(_)\" because of the default value.", + ); + + shellexpand::full(&log_path) + .expect("Failed to expand path") + .to_string() } // Return the desired address for the REST API