aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authordiogo464 <[email protected]>2025-06-19 17:13:33 +0100
committerdiogo464 <[email protected]>2025-06-19 17:13:33 +0100
commitf8bac42e942d7223cecae65d74c91eb35be7830c (patch)
treee63f8aa7e0d0680da428f0aca8767916490ea540 /src/main.rs
parenta365f12a6c6e7775a5bd3c6177050b74826c608c (diff)
Add environment variable support for root directory configuration
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 <[email protected]>
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs2
1 files changed, 1 insertions, 1 deletions
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 {
120#[derive(Args)] 120#[derive(Args)]
121struct Global { 121struct Global {
122 /// Root directory for daemon files (pid, logs). If not specified, searches for git root. 122 /// Root directory for daemon files (pid, logs). If not specified, searches for git root.
123 #[arg(long, global = true)] 123 #[arg(long, global = true, env = "DEMON_ROOT_DIR")]
124 root_dir: Option<PathBuf>, 124 root_dir: Option<PathBuf>,
125} 125}
126 126