Skip to content

Commit

Permalink
issue a warning when FASTN_DANGER_ACCEPT_CHECKED_IN_ENV is used
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhantk232 authored and amitu committed Oct 27, 2023
1 parent 4e6e9a7 commit fcf243c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions fastn/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -578,9 +578,16 @@ Remove it from your version control system or run fastn again with
FASTN_DANGER_ACCEPT_CHECKED_IN_ENV set"
);
std::process::exit(1);
}
} else {
if checked_in && ignore {
println!(
"WARN: your .env file has been detected in the version control system! This poses a
significant security risk in case the source code becomes public."
);
}

if dotenvy::dotenv().is_ok() {
println!("INFO: loaded environment variables from .env file.");
if dotenvy::dotenv().is_ok() {
println!("INFO: loaded environment variables from .env file.");
}
}
}

0 comments on commit fcf243c

Please sign in to comment.