Skip to content

Commit

Permalink
fix: add env name if not default to tree and list command (prefix-dev…
Browse files Browse the repository at this point in the history
  • Loading branch information
ruben-arts authored Apr 10, 2024
1 parent 68033a3 commit 84696d2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cli/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down
4 changes: 4 additions & 0 deletions src/cli/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 84696d2

Please sign in to comment.