Allow identical VIRTUAL_ENV and CONDA_PREFIX env vars (#681)

Port of https://github.com/PyO3/maturin/pull/1879 for
https://github.com/PyO3/maturin/issues/1878
This commit is contained in:
konsti
2023-12-18 09:42:31 +01:00
committed by GitHub
parent 77c6e6fa6c
commit 8c6463d220
@@ -121,6 +121,7 @@ pub(crate) fn detect_virtual_env(target: &PythonPlatform) -> Result<Option<PathB
);
return Ok(Some(PathBuf::from(dir)));
}
(Some(venv), Some(conda)) if venv == conda => return Ok(Some(PathBuf::from(venv))),
(Some(_), Some(_)) => {
return Err(Error::Conflict);
}