-
Notifications
You must be signed in to change notification settings - Fork 370
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
Environment Parameters do not activate/deactivate in Powershell #2644
Comments
Hi @phreed, I am not particularly knowledgeable about Windows, would you mind giving an example of that you observe vs what you expect? You mention you have an issue in Powershell, but point to code for
Could you detail what behavior is inconsistent with what other behavior?
Do you mean you write a |
I see that I was wrong (not reading the code correctly).
The inconsistency is in the documentation (not the behavior).
Yes, that is what I meant. |
Now that I have looked at the code I find that the following works.
{
"FOO": "bar"
} This works on Windows (and I presume the others). However, I do not see this in the documentation. |
I did a test, putting the following in ```$CONDA_PREFIX/etc/conda/activate.d/env-var.ps1. $Env:PROJECT_DIR = "C:\Users\me\Desktop\cts-3.x"
New-Item "C:\Users\me\foo.txt"
Set-Content "C:\Users\me\foo.txt" 'the env_var.ps1 ran' When I activate the corresponding conda environment the |
I don't know enough about powershell to tell whether if this is a bug or not possible (script running in a subshell).
This should be documented, however, right now we do not have detailed doc on all features and been relying a lot on Conda. |
Duplicates #1717 which has been fixed in 2.0. |
I look in
mamba/libmamba/src/core/activation.cpp
Lines 979 to 988 in 16c3da8
In conda the environment variables activate/deactivate in a different manner.
Setting environment variables in cmd.exe and bash are described here.
https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#saving-environment-variables
The installation instructions for
minimamba
has instructions for powershell, https://mamba.readthedocs.io/en/latest/installation.html#windowsThis is inconsistent.
Cause
env_var.ps1
files to be supported in activate/deactivate.The text was updated successfully, but these errors were encountered: