From ec7ff0ecd9db2817dc238a9e047ffb914b4bf6c8 Mon Sep 17 00:00:00 2001 From: detoro Date: Mon, 30 Sep 2024 08:48:46 +0700 Subject: [PATCH] Refactor configuration file path in runtime.rs --- README.md | 2 +- src/config/runtime.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e50186b..73f763b 100644 --- a/README.md +++ b/README.md @@ -157,5 +157,5 @@ $ cd easy-proxy # Build the application $ cargo build --release # Run the application // EASY_PROXY_CONF is the environment variable to set the configuration file path -$ EASY_PROXY_CONF=.config/easy_proxy.yaml ./target/release/easy-proxy +$ EASY_PROXY_CONF=.config/easy-proxy.yaml ./target/release/easy-proxy ``` diff --git a/src/config/runtime.rs b/src/config/runtime.rs index 3671d7f..74a28fa 100644 --- a/src/config/runtime.rs +++ b/src/config/runtime.rs @@ -39,7 +39,7 @@ pub fn initialize() -> Result<(), Errors> { } else { let mut conf_path = env::current_dir() .map_err(|e| Errors::ConfigError(format!("Unable to get current directory: {}", e)))?; - conf_path.push("/etc/easy_proxy/conf.yaml"); + conf_path.push("/etc/easy-proxy/conf.yaml"); conf_path };