Skip to content

Commit

Permalink
Merge branch 'main' into remove_boxfutures
Browse files Browse the repository at this point in the history
  • Loading branch information
joeydewaal authored Oct 7, 2024
2 parents 5e59a2a + 028084b commit 95f6986
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions sqlx-postgres/src/options/pgpass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,20 @@ fn load_password_from_file(
) -> Option<String> {
let file = File::open(&path)
.map_err(|e| {
tracing::warn!(
path = %path.display(),
"Failed to open `.pgpass` file: {e:?}",
);
match e.kind() {
std::io::ErrorKind::NotFound => {
tracing::debug!(
path = %path.display(),
"`.pgpass` file not found",
);
}
_ => {
tracing::warn!(
path = %path.display(),
"Failed to open `.pgpass` file: {e:?}",
);
}
};
})
.ok()?;

Expand Down

0 comments on commit 95f6986

Please sign in to comment.