mirror of
https://github.com/Noratrieb/cargo-minimize.git
synced 2026-01-16 01:05:02 +01:00
Dont use script
This commit is contained in:
parent
6eaf188597
commit
250f0cd557
2 changed files with 58 additions and 25 deletions
|
|
@ -1,9 +1,18 @@
|
|||
fn main() -> anyhow::Result<()> {
|
||||
if std::env::var("MINIMIZE_LINTS").as_deref() == Ok("1") {
|
||||
std::process::Command::new("cargo")
|
||||
.arg("check")
|
||||
.spawn()
|
||||
.unwrap()
|
||||
.wait()
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
let root_var =
|
||||
std::env::var("MINIMIZE_RUNTEST_ROOTS").expect("MINIMIZE_RUNTEST_ROOTS env var not found");
|
||||
let roots = root_var.split(",").collect::<Vec<_>>();
|
||||
|
||||
let proj_dir = std::env::current_dir().expect("current dir not found");
|
||||
|
||||
testsuite::ensure_correct_minimization(&proj_dir, roots)
|
||||
testsuite::ensure_roots_kept(&proj_dir, roots)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue