There was an error while loading. Please reload this page.
1 parent ce572bc commit f0d0f2fCopy full SHA for f0d0f2f
sqlx-cli/src/prepare.rs
@@ -115,16 +115,16 @@ hint: This command only works in the manifest directory of a Cargo package."#
115
bail!("`cargo clean` failed with status: {}", check_status);
116
}
117
118
+ let mut rustflags = env::var("RUSTFLAGS").unwrap_or_default();
119
+ rustflags.push_str(&format!(
120
+ " --cfg __sqlx_recompile_trigger=\"{}\"",
121
+ SystemTime::UNIX_EPOCH.elapsed()?.as_millis()
122
+ ));
123
+
124
Command::new(&cargo)
125
.arg("check")
126
.args(cargo_args)
- .env(
- "RUSTFLAGS",
- format!(
- "--cfg __sqlx_recompile_trigger=\"{}\"",
- SystemTime::UNIX_EPOCH.elapsed()?.as_millis()
- ),
127
- )
+ .env("RUSTFLAGS", rustflags)
128
.env("SQLX_OFFLINE", "false")
129
.status()?
130
} else {
0 commit comments