Open jmborr opened 4 years ago
Thank you for this bug report since I just ran into it and now why it happened! Would be nice to see this elderly issue addressed!
I am updating this issue to note that I found another unbound variable (CONDA_BACKUP_CXX
).
Similarly to the current issue (and this past issue), it is triggered by a set -u
followed by a call to conda activate
inside a bash script.
Here is the relevant part of the error message:
/conda/deactivate.d/deactivate-gxx_linux-64.sh: line 68: CONDA_BACKUP_CXX: unbound variable
Any thing can be done for this?
Try adding this in the bash script:
set +eu SOURCE CONDA set -eu conda deactivate
Current Behavior
Script _/etc/conda/deactivate.d/glibdeactivate.sh restores the value of variable
GSETTINGS_SCHEMA_DIR
with the backup variableGSETTINGS_SCHEMA_DIR_CONDA_BACKUP
, like this:This backup variable is set in script _/etc/conda/activate.d/glibactivate.sh, like this:
The problem: if
GSETTINGS_SCHEMA_DIR
is unbound, thenGSETTINGS_SCHEMA_DIR_CONDA_BACKUP
is unbound too.The error: A bash script containing
set -u
will raise an unbound variable error if _glibdeactivate.sh runs as part of a conda command.The solution: Statement in _glibdeactivate.sh should be:
mimicking the analogous statement in _glibactivate.sh.
Steps to Reproduce
Expected Behavior
Environment Information
`conda info`
``` ```
`conda config --show-sources`
``` ```
`conda list --show-channel-urls`
``` ```