Skip to content

Commit afdcab7

Browse files
committed
Catch and display error about the --all flag.
1 parent ec5e297 commit afdcab7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/bin/cargo/commands/tree.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ pub fn cli() -> App {
1212
"Display the tree for all packages in the workspace",
1313
"Exclude specific workspace members",
1414
)
15+
.arg(Arg::with_name("all").long("all").short("a").hidden(true))
1516
.arg_features()
1617
.arg_target_triple(
1718
"Filter dependencies matching the given target-triple (default host platform)",
@@ -72,6 +73,13 @@ pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult {
7273
)
7374
.into());
7475
}
76+
if args.is_present("all") {
77+
return Err(anyhow::format_err!(
78+
"The `cargo tree` --all flag has been changed to --no-dedupe.\n\
79+
If you are looking to display all workspace members, use the --workspace flag."
80+
)
81+
.into());
82+
}
7583
let ws = args.workspace(config)?;
7684
let charset = tree::Charset::from_str(args.value_of("charset").unwrap())
7785
.map_err(|e| anyhow::anyhow!("{}", e))?;

0 commit comments

Comments
 (0)