I have found these related issues/pull requests
error: error reading dotenv file
Description
This problem seems to be introduced in 0.90. Even if sqlx has all the env variables it needs to complete the build, a restricted permission dotenv two directories up blocks compilation.
Reproduction steps
.env file two directories up the tree from rust project directory with restricted read permissions for the user
SQLx version
0.90
Enabled SQLx features
"runtime-tokio", "tls-rustls-ring-native-roots", "macros", "postgres", "uuid", "chrono", "migrate", "bigdecimal"
Database server and version
postgres 18.2
Operating system
Ubuntu 26.04
Rust version
rustc 1.97.1
I have found these related issues/pull requests
error: error reading dotenv file
Description
This problem seems to be introduced in 0.90. Even if sqlx has all the env variables it needs to complete the build, a restricted permission dotenv two directories up blocks compilation.
Reproduction steps
.env file two directories up the tree from rust project directory with restricted read permissions for the user
SQLx version
0.90
Enabled SQLx features
"runtime-tokio", "tls-rustls-ring-native-roots", "macros", "postgres", "uuid", "chrono", "migrate", "bigdecimal"
Database server and version
postgres 18.2
Operating system
Ubuntu 26.04
Rust version
rustc 1.97.1