Skip to content

Commit e172f19

Browse files
committed
Improve error for flags specific to subcommand
1 parent a7130ce commit e172f19

File tree

4 files changed

+212
-166
lines changed

4 files changed

+212
-166
lines changed

src/clean.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub(crate) fn run(args: &mut Args) -> Result<()> {
2525
cli::merge_config_to_args(&ws, &mut None, &mut args.verbose, &mut args.color);
2626
term::set_coloring(&mut args.color);
2727

28-
if !args.workspace && !args.profraw_only {
28+
if !args.workspace && !args.clean.profraw_only {
2929
for dir in &[&ws.target_dir, &ws.output_dir] {
3030
rm_rf(dir, args.verbose != 0)?;
3131
}
@@ -35,7 +35,13 @@ pub(crate) fn run(args: &mut Args) -> Result<()> {
3535
return Ok(());
3636
}
3737

38-
clean_ws(&ws, &ws.metadata.workspace_members, &args.manifest, args.verbose, args.profraw_only)?;
38+
clean_ws(
39+
&ws,
40+
&ws.metadata.workspace_members,
41+
&args.manifest,
42+
args.verbose,
43+
args.clean.profraw_only,
44+
)?;
3945

4046
Ok(())
4147
}

0 commit comments

Comments
 (0)