From f8bac42e942d7223cecae65d74c91eb35be7830c Mon Sep 17 00:00:00 2001 From: diogo464 Date: Thu, 19 Jun 2025 17:13:33 +0100 Subject: Add environment variable support for root directory configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enable setting the root directory via DEMON_ROOT_DIR environment variable by adding 'env' feature to clap and configuring the root_dir argument to read from environment. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 05208ea..6fbab07 100644 --- a/src/main.rs +++ b/src/main.rs @@ -120,7 +120,7 @@ struct Cli { #[derive(Args)] struct Global { /// Root directory for daemon files (pid, logs). If not specified, searches for git root. - #[arg(long, global = true)] + #[arg(long, global = true, env = "DEMON_ROOT_DIR")] root_dir: Option, } -- cgit