Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always use environment path when running conda environment commands (#…
…24807) Attempt at fixing #24585 There are many edge scenarious where refering to the name of the environment rather than the path can cause breaks in the extension. Some examples 1 -**If we have two anonymous environments with the same name in different folders** /path1/my-env /path2/my-env (where my active vscode python interpreter is) by using conda -n my-env it'll always use the first env. 2 - **Some times people avoid actually activating their conda envs when using conda-pack** https://github.com/conda/conda-pack This is because the activation scripts are known to be flaky and not very reliable 3 - **The environment may have been created by a conda-compliant replacement** Therefore conda itself is not aware of it by name but can work with it properly using the path. This is the case of [hawk](https://community.palantir.com/t/introducing-hawk-for-python-package-management-in-code-repositories/500) or frankly anyone building their own conda package manager on top of [rattler](https://github.com/conda/rattler). Some of these points are also hinted at #24627 (comment) , and supported by a conda maintainer in #24585 (comment) This PR has a minimal attempt at changing that by always forcing -p usage
- Loading branch information