Skip to content

Commit 7dfb268

Browse files
konstinmessense
andauthored
Allow identical VIRTUAL_ENV and CONDA_PREFIX env vars (#1879)
* Allow identical `VIRTUAL_ENV` and `CONDA_PREFIX` env vars Fixes #1878 * cargo fmt --------- Co-authored-by: messense <messense@icloud.com>
1 parent 2531f33 commit 7dfb268

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ fn detect_venv(target: &Target) -> Result<PathBuf> {
191191
match (env::var_os("VIRTUAL_ENV"), env::var_os("CONDA_PREFIX")) {
192192
(Some(dir), None) => return Ok(PathBuf::from(dir)),
193193
(None, Some(dir)) => return Ok(PathBuf::from(dir)),
194+
(Some(venv), Some(conda)) if venv == conda => return Ok(PathBuf::from(venv)),
194195
(Some(_), Some(_)) => {
195196
bail!("Both VIRTUAL_ENV and CONDA_PREFIX are set. Please unset one of them")
196197
}

0 commit comments

Comments
 (0)