mirror of
https://github.com/launchbadge/sqlx
synced 2024-11-10 14:34:19 +00:00
Append to existing RUSTFLAGS, instead of overwriting. (#1582)
* Append to existing RUSTFLAGS, instead of overwriting. * Assemble RUSTFLAGS correctly. Co-authored-by: Thomas Kintscher <thomas@flowciety.de>
This commit is contained in:
parent
ce572bcee4
commit
f0d0f2f2e9
1 changed files with 7 additions and 7 deletions
|
@ -115,16 +115,16 @@ hint: This command only works in the manifest directory of a Cargo package."#
|
|||
bail!("`cargo clean` failed with status: {}", check_status);
|
||||
}
|
||||
|
||||
let mut rustflags = env::var("RUSTFLAGS").unwrap_or_default();
|
||||
rustflags.push_str(&format!(
|
||||
" --cfg __sqlx_recompile_trigger=\"{}\"",
|
||||
SystemTime::UNIX_EPOCH.elapsed()?.as_millis()
|
||||
));
|
||||
|
||||
Command::new(&cargo)
|
||||
.arg("check")
|
||||
.args(cargo_args)
|
||||
.env(
|
||||
"RUSTFLAGS",
|
||||
format!(
|
||||
"--cfg __sqlx_recompile_trigger=\"{}\"",
|
||||
SystemTime::UNIX_EPOCH.elapsed()?.as_millis()
|
||||
),
|
||||
)
|
||||
.env("RUSTFLAGS", rustflags)
|
||||
.env("SQLX_OFFLINE", "false")
|
||||
.status()?
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue