mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-19 16:44:07 +00:00
fix(macros): smarter .env loading, caching, and invalidation (#4053)
* fix(macros): smarter `.env` loading, caching, and invalidation * feat(mysql): test `.env` loading in CI * feat(postgres): test `.env` loading in CI * feat(macros): allow `DATABASE_URL` to be empty * fix(examples/postgres): make `cargo-sqlx` executable * fix(examples/postgres): `cargo sqlx` invocation * feat(examples/postgres): check offline prepare on more examples * fix(examples/postgres): the name of this step * fix(cli): don't suppress error from `dotenv()` * fix(ci/examples/postgres): don't use heredoc in this step * fix(ci/examples/postgres): multi-tenant * fix(ci/examples/sqlite): test `.env` loading * chore: add CHANGELOG entry
This commit is contained in:
@@ -49,7 +49,11 @@ pub fn maybe_apply_dotenv() {
|
||||
return;
|
||||
}
|
||||
|
||||
dotenvy::dotenv().ok();
|
||||
if let Err(e) = dotenvy::dotenv() {
|
||||
if !e.not_found() {
|
||||
eprintln!("Warning: error loading `.env` file: {e:?}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn run(opt: Opt) -> anyhow::Result<()> {
|
||||
|
||||
Reference in New Issue
Block a user