pub fn show_installed(lib_path: &Path, path_reqs: &[Req]) {
    let installed = find_installed(lib_path);
    let scripts = find_console_scripts(&lib_path.join("../bin"));

    if installed.is_empty() {
        print_color("No packages are installed.", Color::DarkBlue);
    } else {
        print_color("These packages are installed:", Color::DarkBlue);
        for (name, version, _tops) in installed {
            //        print_color(&format!("{} == \"{}\"", name, version.to_string()), Color::Magenta);
            println!(
                "{}{}{} == {}",
                Colored::Fg(Color::Cyan),
                name,
                Colored::Fg(Color::Reset),
                version
            );
        }
        for req in path_reqs {
            println!(
                "{}{}{}, at path: {}",
                Colored::Fg(Color::Cyan),
                req.name,
                Colored::Fg(Color::Reset),
                req.path.as_ref().unwrap(),
            );
        }
    }

    if scripts.is_empty() {
        print_color("\nNo console scripts are installed.", Color::DarkBlue);
    } else {
        print_color("\nThese console scripts are installed:", Color::DarkBlue);
        for script in scripts {
            print_color(&script, Color::DarkCyan);
        }
    }
}
/// List all installed dependencies and console scripts, by examining the `libs` and `bin` folders.
/// Also include path requirements, which won't appear in the `lib` folder.
List all installed dependencies and console scripts, by examining the `libs` and `bin` folders.
Also include path requirements, which won't appear in the `lib` folder.
List all installed dependencies and console scripts by examining the ` libs ` and ` bin ` folders . Also include path requirements which won ' t appear in the ` lib ` folder .
pub fn show_installed(lib_path: &Path, path_reqs: &[Req]) {
    let installed = find_installed(lib_path);
    let scripts = find_console_scripts(&lib_path.join("../bin"));
    if installed.is_empty() {
        print_color("No packages are installed.", Color::DarkBlue);
    } else {
        print_color("These packages are installed:", Color::DarkBlue);
        for (name, version, _tops) in installed {
            //        print_color(&format!("{} == \"{}\"", name, version.to_string()), Color::Magenta);
            println!(
                "{}{}{} == {}",
                Colored::Fg(Color::Cyan),
                name,
                Colored::Fg(Color::Reset),
                version
            );
        }
        for req in path_reqs {
            println!(
                "{}{}{}, at path: {}",
                Colored::Fg(Color::Cyan),
                req.name,
                Colored::Fg(Color::Reset),
                req.path.as_ref().unwrap(),
            );
        }
    }
    if scripts.is_empty() {
        print_color("\nNo console scripts are installed.", Color::DarkBlue);
    } else {
        print_color("\nThese console scripts are installed:", Color::DarkBlue);
        for script in scripts {
            print_color(&script, Color::DarkCyan);
        }
    }
}
pub fn show_installed ( lib_path : & Path , path_reqs : & [ Req ] ) { let installed = find_installed ( lib_path ) ; let scripts = find_console_scripts ( & lib_path . join ( " " ) ) ; if installed . is_empty ( ) { print_color ( " " , Color :: DarkBlue ) ; } else { print_color ( " " , Color :: DarkBlue ) ; for ( name , version , _tops ) in installed { //        print_color(&format!("{} == \"{}\"", name, version.to_string()), Color::Magenta); println ! ( " " Colored Fg ( Color Cyan ) name Colored Fg ( Color Reset ) version ) ; } for req in path_reqs { println ! ( " " Colored Fg ( Color Cyan ) req name Colored Fg ( Color Reset ) req path as_ref ( ) unwrap ( ) ) ; } } if scripts . is_empty ( ) { print_color ( " \n " , Color :: DarkBlue ) ; } else { print_color ( " \n " , Color :: DarkBlue ) ; for script in scripts { print_color ( & script , Color :: DarkCyan ) ; } } }
List all installed dependencies and console scripts, by examining the `libs` and `bin` folders.
List all installed dependencies and console scripts by examining the ` libs ` and ` bin ` folders .
lib_path
&Path
path_reqs
&[Req]