internal: ⬆️ xflags

The main change here should be that flags are not inhereted, so

   $ rust-analyzer analysis-stats . -v -v

would do what it should do

We also no longer Don\'t
This commit is contained in:
Aleksey Kladov 2022-10-08 15:35:07 +01:00
parent 8437e4ba58
commit 39fa8b5c39
7 changed files with 32 additions and 48 deletions

View file

@ -25,15 +25,12 @@ use std::{
use xshell::{cmd, Shell};
fn main() -> anyhow::Result<()> {
let flags = flags::Xtask::from_env_or_exit();
let sh = &Shell::new()?;
sh.change_dir(project_root());
let flags = flags::Xtask::from_env()?;
match flags.subcommand {
flags::XtaskCmd::Help(_) => {
println!("{}", flags::Xtask::HELP);
Ok(())
}
flags::XtaskCmd::Install(cmd) => cmd.run(sh),
flags::XtaskCmd::FuzzTests(_) => run_fuzzer(sh),
flags::XtaskCmd::Release(cmd) => cmd.run(sh),