Setting conda environment variable containing = symbol does not work, works in bash

Viewed 167

In Conda, setting an environment variable containing the = (equals) symbol causes the value to be saved incorrectly (only partial or blank, or error such as "bash: unexpected EOF while looking for matching `''). Works in bash outside of conda env. The equals symbol is needed, as real life example is a long connection string.

Steps to Reproduce

conda env config vars set TESTVAR="FOO=BAR"

conda deactivate
conda activate myenv
echo $TESTVAR  <-- Results in blank

However the following saves the expected variable properly (without the = sign)

conda env config vars set TESTVAR="FOOBAR"

I Have tried escaping both with \ and single quote '

0 Answers
Related