add STEAMGUARD_CLI_PASSKEY environment variable

This commit is contained in:
Carson McManus 2022-06-23 23:29:14 -04:00
parent 3f5fa9a033
commit cac5f57cc7
2 changed files with 7 additions and 2 deletions

View file

@ -33,7 +33,7 @@ serde_json = "1.0"
rsa = "0.5.0"
rand = "0.8.4"
standback = "0.2.17" # required to fix a compilation error on a transient dependency
clap = { version = "3.1.18", features = ["derive", "cargo"] }
clap = { version = "3.1.18", features = ["derive", "cargo", "env"] }
clap_complete = "3.2.1"
log = "0.4.14"
stderrlog = "0.4"

View file

@ -27,7 +27,12 @@ pub(crate) struct Args {
help = "Specify which folder your maFiles are in. This should be a path to a folder that contains manifest.json. Default: ~/.config/steamguard-cli/maFiles"
)]
pub mafiles_path: Option<String>,
#[clap(short, long, help = "Specify your encryption passkey.")]
#[clap(
short,
long,
env = "STEAMGUARD_CLI_PASSKEY",
help = "Specify your encryption passkey."
)]
pub passkey: Option<String>,
#[clap(short, long, arg_enum, default_value_t=Verbosity::Info, help = "Set the log level. Be warned, trace is capable of printing sensitive data.")]
pub verbosity: Verbosity,