-
Notifications
You must be signed in to change notification settings - Fork 168
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
fix: Adapt shell init for mamba 2 #914
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Julien Jerphanion <[email protected]>
We require contributors to sign our Contributor License Agreement and we don't have one on file for @jjerphan. In order for us to review and merge your code, please e-sign the Contributor License Agreement PDF. We then need to manually verify your signature, merge the PR (conda/infrastructure#1078), and ping the bot to refresh the PR. |
@conda-bot check |
Signed-off-by: Julien Jerphanion <[email protected]>
@@ -671,11 +671,22 @@ if [ "$BATCH" = "0" ]; then | |||
*) "$PREFIX/bin/python" -m conda init ;; | |||
esac | |||
if [ -f "$PREFIX/bin/mamba" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing this code now, I think it might result into double initialization, right? Once with conda, once with mamba. Are those compatible or should they be exclusive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think conda's initialization is overridden by mamba's; so it works, but it might not be totally sane. I guess we can keep the same behavior when 1.x is used unchanged, and see potential adaptations for 2.x.
What do you think? Is there a way to test that this works with both versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need to add cases for it in the examples/
directory. Maybe you can repurpose the Miniforge
example (which might need to get synced up with current Miniforge scripts anyway), and then parametrize with some environment variables as we are doing in some other tests. Check for os.environ
in the construct.yaml
templates and also monkeypatch.setenv
calls in tests/test_examples.py
.
Co-authored-by: jaimergp <[email protected]>
Description
Fix conda-forge/miniforge#697.
Checklist - did you ...
news
directory (using the template) for the next release's release notes?I am interested to have some guidance on the best way to test it.