Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deactivate script is deprecated and not available on mamba environments #270

Open
2 tasks done
djhoese opened this issue Jun 1, 2023 · 0 comments
Open
2 tasks done
Labels
type::bug describes erroneous operation, use severity::* to classify the type

Comments

@djhoese
Copy link

djhoese commented Jun 1, 2023

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

The bin/deactivate script created in conda environments is deprecated:

https://github.com/conda/conda/blob/9a9610fbaf436b7eef4b13559afb756b1b60d047/conda/shell/bin/deactivate#L3

This file is looked for as part of the activation script of conda-pack:

# If there's already a source env
if [ -n "$CONDA_PREFIX" ]; then
# If the source env differs from this env
if [ "$CONDA_PREFIX" != "$full_path_env" ]; then
# Check whether deactivate is a function or executable
type deactivate >/dev/null 2>/dev/null
if [ $? -eq 0 ]; then
. deactivate >/dev/null 2>/dev/null
fi
else
return 0 # nothing to do
fi
fi

The mamba tool has already deprecated/not included the deactivate script so the above checks fail. This results in any pre-activated mamba environments not being deactivated during activation of the conda-pack'd environment. In my own tests this resulted in scripts calling the conda-pack'd activate script to just exit and not run anything after activation.

Conda Info

The tarball was created in CI. You can see the build here:

https://github.com/ssec/sift/actions/runs/5086231711/jobs/9140500154

Conda Config

conda-forge

See https://github.com/ssec/sift/actions/runs/5086231711/jobs/9140500154

Conda list

https://github.com/ssec/sift/actions/runs/5086231711/jobs/9140500154

Additional Context

No response

@djhoese djhoese added the type::bug describes erroneous operation, use severity::* to classify the type label Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::bug describes erroneous operation, use severity::* to classify the type
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant