Skip to content

Commit

Permalink
don't use test env in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
fairingrey committed Feb 9, 2022
1 parent 8375ac9 commit 794dd10
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ pub(crate) mod utils;

#[tokio::main]
async fn main() -> Result<(), anyhow::Result<()>> {
dotenv::dotenv().ok();
if cfg!(debug_assertions) {
dotenv::dotenv().ok();
} else {
dotenv::from_filename("prod.env").ok();
}

if std::env::var_os("RUST_LOG").is_none() {
std::env::set_var("RUST_LOG", "mixini=debug")
Expand Down

0 comments on commit 794dd10

Please sign in to comment.