From 7fac74d304d17390ea99a4014de7f1ba110b81fc Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Sat, 26 Jun 2021 15:04:49 +0300 Subject: [PATCH] Do not run pip inside a virtual environment (fix #732) (#733) --- src/steps/generic.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/steps/generic.rs b/src/steps/generic.rs index 3b110e64..086ec305 100644 --- a/src/steps/generic.rs +++ b/src/steps/generic.rs @@ -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)