Merge pull request #158 from dyc3/passkey-env-var

add STEAMGUARD_CLI_PASSKEY environment variable
This commit is contained in:
Carson McManus 2022-06-23 23:58:18 -04:00 committed by GitHub
commit 9f338a7af3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -33,7 +33,7 @@ serde_json = "1.0"
rsa = "0.5.0" rsa = "0.5.0"
rand = "0.8.4" rand = "0.8.4"
standback = "0.2.17" # required to fix a compilation error on a transient dependency 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" clap_complete = "3.2.1"
log = "0.4.14" log = "0.4.14"
stderrlog = "0.4" 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" 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>, 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>, 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.")] #[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, pub verbosity: Verbosity,