Add support for custom .env file path

This commit is contained in:
Joel Beckmeyer 2022-02-16 09:25:37 -05:00
parent 08f0de7b46
commit 8295688bed
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ macro_rules! make_config {
impl ConfigBuilder {
#[allow(clippy::field_reassign_with_default)]
fn from_env() -> Self {
match dotenv::from_path(".env") {
match dotenv::from_path(get_env("ENV_FILE").unwrap_or_else(|| String::from(".env"))) {
Ok(_) => (),
Err(e) => match e {
dotenv::Error::LineParse(msg, pos) => {