From 1b35da2d07a4f0c6261c2496a53dd7c8c707817f Mon Sep 17 00:00:00 2001 From: Guillaume Yziquel <142336927+gl-yziquel@users.noreply.github.com> Date: Wed, 22 May 2024 21:53:15 +0000 Subject: [PATCH] Using HIMALAYA_CONFIG as a way to provide himalaya configuration file from environment. --- Cargo.toml | 2 +- src/cli.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0d2c31a..07a0d05 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,7 +48,7 @@ pgp-native = ["email-lib/pgp-native", "mml-lib/pgp-native", "pgp"] [dependencies] ariadne = "0.2" async-trait = "0.1" -clap = { version = "4.4", features = ["derive", "wrap_help"] } +clap = { version = "4.4", features = ["derive", "wrap_help", "env"] } clap_complete = "4.4" clap_mangen = "0.2" color-eyre = "0.6.3" diff --git a/src/cli.rs b/src/cli.rs index 440f08b..d6e58f3 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -33,7 +33,7 @@ pub struct Cli { /// configuration file. Other paths are merged with the first one, /// which allows you to separate your public config from your /// private(s) one(s). - #[arg(short, long = "config", global = true)] + #[arg(short, long = "config", global = true, env = "HIMALAYA_CONFIG")] #[arg(value_name = "PATH", value_parser = config::path_parser)] pub config_paths: Vec,