diff --git a/src/cli/list.rs b/src/cli/list.rs index 1f4519edc..eae1bf599 100644 --- a/src/cli/list.rs +++ b/src/cli/list.rs @@ -206,6 +206,10 @@ pub async fn execute(args: Args) -> miette::Result<()> { // print packages as json json_packages(&packages_to_output, args.json_pretty); } else { + if !environment_name.is_default() { + eprintln!("Environment: {}", environment_name.fancy_display()); + } + // print packages as table print_packages_as_table(&packages_to_output).expect("an io error occurred"); } diff --git a/src/cli/tree.rs b/src/cli/tree.rs index 585b8ae50..829583634 100644 --- a/src/cli/tree.rs +++ b/src/cli/tree.rs @@ -92,6 +92,10 @@ pub async fn execute(args: Args) -> miette::Result<()> { let direct_deps = direct_dependencies(&environment, &platform); + if !environment_name.is_default() { + eprintln!("Environment: {}", environment_name.fancy_display()); + } + if args.invert { print_inverted_dependency_tree(&invert_dep_map(&dep_map), &direct_deps, &args.regex)?; } else {