use crate::cli::commands;
use crate::error::*;
use crate::Context;
pub fn show_deps(context: &Context) -> Result<(), Error> {
let Context { venv_runner, .. } = context;
venv_runner.run(&["python", "-m", "pip", "list"])
}
pub fn show_outdated(context: &Context) -> Result<(), Error> {
let Context { venv_runner, .. } = context;
#[rustfmt::skip]
let cmd = &[
"python", "-m", "pip",
"list", "--outdated",
"--format", "columns",
];
venv_runner.run(cmd)
}
pub fn show_venv_path(context: &Context) -> Result<(), Error> {
let Context { paths, .. } = context;
println!("{}", paths.venv.display());
Ok(())
}
pub fn show_venv_bin_path(context: &Context) -> Result<(), Error> {
let Context { venv_runner, .. } = context;
commands::expect_venv(&context)?;
let bin_path = venv_runner.binaries_path();
println!("{}", bin_path.display());
Ok(())
}