From b45d0d9a972005991c71b460bb6235858ec8c3bc Mon Sep 17 00:00:00 2001 From: Lara Date: Sat, 9 Feb 2019 18:47:58 +0100 Subject: [PATCH] Add env option for parameters --- src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.rs b/src/main.rs index 8736208..203450f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,6 +37,7 @@ fn main() { Arg::with_name("host") .short("h") .long("host") + .env("HOST") .required(true) .takes_value(true), ) @@ -44,6 +45,7 @@ fn main() { Arg::with_name("port") .short("p") .long("port") + .env("PORT") .takes_value(true) .default_value("1883"), ) @@ -51,6 +53,7 @@ fn main() { Arg::with_name("lifx-secret") .short("s") .long("lifx-secret") + .env("LIFX_SECRET") .required(true) .takes_value(true), )