Browse Source

Emit warning generated by dotenv.

Emit warning regarding the dotenv crate instead of silently passing on.
This could help in troubleshooting configuration issues.

This partially fixes #1196 by reporting the line regarding spaces.
Solving that ticket by allowing spaces would be difficult from within
bitwarden_rs it self.
pull/1211/head
BlackDex 5 years ago
parent
commit
be9efbddb2
  1. 9
      src/config.rs

9
src/config.rs

@ -53,7 +53,14 @@ macro_rules! make_config {
impl ConfigBuilder {
fn from_env() -> Self {
dotenv::from_path(".env").ok();
match dotenv::from_path(".env") {
Ok(_) => (),
Err(err) => {
println!("[WARNING] There was an issue loading the .env file:");
println!("[WARNING] {:?}\n", err);
()
}
};
let mut builder = ConfigBuilder::default();
$($(

Loading…
Cancel
Save