Don't set env variables that are already set inside system service
This commit is contained in:
parent
c8442710b4
commit
e563af5c1f
1 changed files with 3 additions and 1 deletions
|
@ -115,7 +115,9 @@ fn set_environment() -> Environment {
|
|||
let vars = std::str::from_utf8(command.stdout.as_slice()).unwrap().split("\n").collect::<Vec<&str>>();
|
||||
for var in vars {
|
||||
if let Some((variable, value)) = var.split_once("=") {
|
||||
env::set_var(variable, value);
|
||||
if let Err(env::VarError::NotPresent) = env::var(variable) {
|
||||
env::set_var(variable, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
true
|
||||
|
|
Loading…
Add table
Reference in a new issue