cli: fallback to environment variable
This commit is contained in:
parent
6eddd4c2a0
commit
25d28531a1
2 changed files with 2 additions and 1 deletions
|
@ -12,7 +12,7 @@ categories = ["command-line-interface", "config", "development-tools"]
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "3.2.15", default-features = false, features = ["std", "derive"] }
|
||||
clap = { version = "3.2.15", default-features = false, features = ["std", "env", "derive"] }
|
||||
|
||||
[features]
|
||||
color = ["clap/color"]
|
||||
|
|
|
@ -39,6 +39,7 @@ pub struct Args {
|
|||
short = 'f',
|
||||
long,
|
||||
default_value = ".env",
|
||||
env = "VNETOD_FILE",
|
||||
help = "Change source file with environment variables"
|
||||
)]
|
||||
pub file: PathBuf,
|
||||
|
|
Loading…
Reference in a new issue