committed by
GitHub
parent
f21ba9d495
commit
54741ff899
@@ -1,4 +1,15 @@
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use std::path::PathBuf;
|
||||
use std::process::Command;
|
||||
use std::{env, path::Path};
|
||||
use std::{fs, io::Write};
|
||||
|
||||
use anyhow::Result;
|
||||
use directories::BaseDirs;
|
||||
use log::debug;
|
||||
use tempfile::tempfile_in;
|
||||
|
||||
use crate::execution_context::ExecutionContext;
|
||||
use crate::executor::{CommandExt, ExecutorOutput, RunType};
|
||||
use crate::terminal::{print_separator, shell};
|
||||
@@ -7,14 +18,6 @@ use crate::{
|
||||
error::{SkipStep, TopgradeError},
|
||||
terminal::print_warning,
|
||||
};
|
||||
use anyhow::Result;
|
||||
use directories::BaseDirs;
|
||||
use log::debug;
|
||||
use std::path::PathBuf;
|
||||
use std::process::Command;
|
||||
use std::{env, path::Path};
|
||||
use std::{fs, io::Write};
|
||||
use tempfile::tempfile_in;
|
||||
|
||||
pub fn run_cargo_update(ctx: &ExecutionContext) -> Result<()> {
|
||||
let cargo_dir = env::var_os("CARGO_HOME")
|
||||
@@ -226,6 +229,16 @@ pub fn run_pipx_update(run_type: RunType) -> Result<()> {
|
||||
run_type.execute(&pipx).arg("upgrade-all").check_run()
|
||||
}
|
||||
|
||||
pub fn run_conda_update(ctx: &ExecutionContext) -> Result<()> {
|
||||
let conda = utils::require("conda")?;
|
||||
print_separator("Conda");
|
||||
|
||||
ctx.run_type()
|
||||
.execute(&conda)
|
||||
.args(&["update", "--all", "-y"])
|
||||
.check_run()
|
||||
}
|
||||
|
||||
pub fn run_pip3_update(run_type: RunType) -> Result<()> {
|
||||
let pip3 = utils::require("pip3")?;
|
||||
print_separator("pip3");
|
||||
|
||||
Reference in New Issue
Block a user