Skip to content

Commit

Permalink
add 1 as true for SQLX_OFFLINE env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Pleto authored and mehcode committed Dec 17, 2020
1 parent 4973ae5 commit 9f99a8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sqlx-macros/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub fn expand_input(input: QueryMacroInput) -> crate::Result<TokenStream> {
// if `dotenv` wasn't initialized by the above we make sure to do it here
match (
dotenv::var("SQLX_OFFLINE")
.map(|s| s.to_lowercase() == "true")
.map(|s| s.eq_ignore_ascii_case("true") || s == "1")
.unwrap_or(false),
dotenv::var("DATABASE_URL"),
) {
Expand Down

0 comments on commit 9f99a8f

Please sign in to comment.