Do not run pip inside a virtual environment (fix #732) (#733)

This commit is contained in:
Roey Darwish Dror
2021-06-26 15:04:49 +03:00
committed by GitHub
parent 90da4331d1
commit 7fac74d304

View File

@@ -205,6 +205,10 @@ pub fn run_pipx_update(run_type: RunType) -> Result<()> {
pub fn run_pip3_update(run_type: RunType) -> Result<()> {
let pip3 = utils::require("pip3")?;
print_separator("pip3");
if std::env::var("VIRTUAL_ENV").is_ok() {
print_warning("This step is will be skipped when running inside a virtual environment");
return Err(SkipStep("Does not run inside a virtual environment".to_string()).into());
}
run_type
.execute(&pip3)