Do not run Conda if auto_activate_base is set to False (#841)
This commit is contained in:
committed by
GitHub
parent
63f4e01650
commit
0525e5aac3
@@ -244,6 +244,16 @@ pub fn run_pipx_update(run_type: RunType) -> Result<()> {
|
|||||||
|
|
||||||
pub fn run_conda_update(ctx: &ExecutionContext) -> Result<()> {
|
pub fn run_conda_update(ctx: &ExecutionContext) -> Result<()> {
|
||||||
let conda = utils::require("conda")?;
|
let conda = utils::require("conda")?;
|
||||||
|
|
||||||
|
let output = Command::new("conda")
|
||||||
|
.args(&["config", "--show", "auto_activate_base"])
|
||||||
|
.output()?;
|
||||||
|
let string_output = String::from_utf8(output.stdout)?;
|
||||||
|
debug!("Conda output: {}", string_output);
|
||||||
|
if string_output.contains("False") {
|
||||||
|
return Err(SkipStep("auto_activate_base is set to False".to_string()).into());
|
||||||
|
}
|
||||||
|
|
||||||
print_separator("Conda");
|
print_separator("Conda");
|
||||||
|
|
||||||
ctx.run_type()
|
ctx.run_type()
|
||||||
|
|||||||
Reference in New Issue
Block a user