From 7c479fd8a7af670b8ff55f6d1d5c0d5178e6c196 Mon Sep 17 00:00:00 2001 From: Jane Lusby Date: Mon, 23 Mar 2020 10:41:19 -0700 Subject: [PATCH] Start work on clippy-fix as subcommand --- src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 93e6996be06..66c1aa4d97c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -59,6 +59,11 @@ where let mut args = vec!["check".to_owned()]; for arg in old_args.by_ref() { + if arg == "--fix" { + args[0] = "fix".to_owned(); + continue; + } + if arg == "--" { break; } @@ -96,7 +101,7 @@ where let exit_status = std::process::Command::new("cargo") .args(&args) - .env("RUSTC_WRAPPER", path) + .env("RUSTC_WORKSPACE_WRAPPER", path) .env("CLIPPY_ARGS", clippy_args) .envs(target_dir) .spawn()