check value env variable SVDIR
This commit is contained in:
parent
fad19ac060
commit
a66357a179
1 changed files with 12 additions and 0 deletions
|
@ -7,6 +7,18 @@ use std::env;
|
|||
fn main() {
|
||||
let args: Vec<String> = env::args().collect();
|
||||
|
||||
// def env variables.
|
||||
let svdir_env = env::var("SVDIR");
|
||||
//let svwait_env = env::var("SVWAIT");
|
||||
|
||||
let svdir_var = match svdir_env {
|
||||
Ok(var) => var,
|
||||
Err(..) => "/run/runit/service".to_string(),
|
||||
};
|
||||
|
||||
dbg!(svdir_var);
|
||||
|
||||
|
||||
// args
|
||||
let arg_parser: Vec<String> = parser::parse_args(args);
|
||||
|
||||
|
|
Loading…
Reference in a new issue