We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5e59a2a + 028084b commit 95f6986Copy full SHA for 95f6986
sqlx-postgres/src/options/pgpass.rs
@@ -43,10 +43,20 @@ fn load_password_from_file(
43
) -> Option<String> {
44
let file = File::open(&path)
45
.map_err(|e| {
46
- tracing::warn!(
47
- path = %path.display(),
48
- "Failed to open `.pgpass` file: {e:?}",
49
- );
+ match e.kind() {
+ std::io::ErrorKind::NotFound => {
+ tracing::debug!(
+ path = %path.display(),
50
+ "`.pgpass` file not found",
51
+ );
52
+ }
53
+ _ => {
54
+ tracing::warn!(
55
56
+ "Failed to open `.pgpass` file: {e:?}",
57
58
59
+ };
60
})
61
.ok()?;
62
0 commit comments