Skip to content

Commit 9f99a8f

Browse files
Pletomehcode
authored andcommitted
add 1 as true for SQLX_OFFLINE env variable
1 parent 4973ae5 commit 9f99a8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sqlx-macros/src/query/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub fn expand_input(input: QueryMacroInput) -> crate::Result<TokenStream> {
3737
// if `dotenv` wasn't initialized by the above we make sure to do it here
3838
match (
3939
dotenv::var("SQLX_OFFLINE")
40-
.map(|s| s.to_lowercase() == "true")
40+
.map(|s| s.eq_ignore_ascii_case("true") || s == "1")
4141
.unwrap_or(false),
4242
dotenv::var("DATABASE_URL"),
4343
) {

0 commit comments

Comments
 (0)