Skip to content

Commit 95f6986

Browse files
authored
Merge branch 'main' into remove_boxfutures
2 parents 5e59a2a + 028084b commit 95f6986

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

sqlx-postgres/src/options/pgpass.rs

+14-4
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,20 @@ fn load_password_from_file(
4343
) -> Option<String> {
4444
let file = File::open(&path)
4545
.map_err(|e| {
46-
tracing::warn!(
47-
path = %path.display(),
48-
"Failed to open `.pgpass` file: {e:?}",
49-
);
46+
match e.kind() {
47+
std::io::ErrorKind::NotFound => {
48+
tracing::debug!(
49+
path = %path.display(),
50+
"`.pgpass` file not found",
51+
);
52+
}
53+
_ => {
54+
tracing::warn!(
55+
path = %path.display(),
56+
"Failed to open `.pgpass` file: {e:?}",
57+
);
58+
}
59+
};
5060
})
5161
.ok()?;
5262

0 commit comments

Comments
 (0)