`lb-conda-dev` ignores the specified version and uses latest `default` instead
When creating a clone of a specific version of default
with lb-conda-dev virtual-env default/2021-09-07 my-local-directory
e.g. the environment created in my-local-directory
uses the latest default
instead of default/2021-09-07
.
For example:
$ lb-conda-dev virtual-env default/2021-09-07 conda_2021-09-07
$ lb-conda-dev virtual-env default conda_default
$ conda_2021-09-07/run python --version
Python 3.11.4
$ conda_default/run python --version
Python 3.11.4
Whereas:
$ lb-conda default/2021-09-07 python --version
Python 3.9.7
I think this is caused by this line https://gitlab.cern.ch/lhcb-core/lbcondawrappers/-/blob/master/src/LbCondaWrappers/__init__.py#L486 which should be env_prefix = get_env_prefix(args.env_name)
otherwise if the argument passed (args.env_name
) was default/2021-09-07
then on this line env_name
is just default
which is then passed to get_env_prefix
and the version number is lost (I think this is the problem but I'm not sure how to actually test this locally to see if it fixes it).