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

Conda init zsh ignores $ZDOTDIR variable #9362

Closed
savq opened this issue Oct 23, 2019 · 2 comments · Fixed by #10413
Closed

Conda init zsh ignores $ZDOTDIR variable #9362

savq opened this issue Oct 23, 2019 · 2 comments · Fixed by #10413
Labels
good first issue great for new contributors, code change is envisioned to be trivial/relatively straight-forward locked [bot] locked due to inactivity type::bug describes erroneous operation, use severity::* to classify the type

Comments

@savq
Copy link

savq commented Oct 23, 2019

Current Behavior

When using conda init zsh, conda will create a .zshrc file in my $HOME directory instead of looking for one in my $ZDOTDIR directory.

I have set $ZDOTDIR in a .zshenv file (in $HOME), all my other zsh files, in particular .zshrc, are in $ZDOTDIR. Since this duplicate file created by conda won't be read by the shell, conda packages can't be called.

Steps to Reproduce

On zsh:
Set $ZDOTDIR to a directory different from $HOME.
Move or create a .zshrc file in $ZDOTDIR.
run conda init zsh.

Expected Behavior

Conda init zsh should look for .zshrc in $ZDOTDIR (as zsh does).

I understand the problem can easily be fixed by copy-pasting the text from one file to another,
but it would be better if the default behavior was to look for the .zshrc file in $ZDOTDIR.

Environment Information

`conda info`


     active environment : None
       user config file : /Users/sergioalejandro/.condarc
 populated config files :
          conda version : 4.7.12
    conda-build version : not installed
         python version : 3.7.3.final.0
       virtual packages :
       base environment : /usr/local/Caskroom/miniconda/base  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /usr/local/Caskroom/miniconda/base/pkgs
                          /Users/sergioalejandro/.conda/pkgs
       envs directories : /usr/local/Caskroom/miniconda/base/envs
                          /Users/sergioalejandro/.conda/envs
               platform : osx-64
             user-agent : conda/4.7.12 requests/2.22.0 CPython/3.7.3 Darwin/19.0.0 OSX/10.15
                UID:GID : 501:20
             netrc file : None
           offline mode : False

`conda config --show-sources`


`conda list --show-channel-urls`

# packages in environment at /usr/local/Caskroom/miniconda/base:
#
# Name                    Version                   Build  Channel
appnope                   0.1.0                    py37_0    defaults
asn1crypto                1.2.0                    py37_0    defaults
attrs                     19.3.0                     py_0    defaults
backcall                  0.1.0                    py37_0    defaults
bleach                    3.1.0                    py37_0    defaults
ca-certificates           2019.10.16                    0    defaults
certifi                   2019.9.11                py37_0    defaults
cffi                      1.13.0           py37hb5b8e2f_0    defaults
chardet                   3.0.4                 py37_1003    defaults
conda                     4.7.12                   py37_0    defaults
conda-package-handling    1.6.0            py37h1de35cc_0    defaults
cryptography              2.8              py37ha12b0ac_0    defaults
dbus                      1.13.6               h90a0687_0    defaults
decorator                 4.4.0                    py37_1    defaults
defusedxml                0.6.0                      py_0    defaults
entrypoints               0.3                      py37_0    defaults
expat                     2.2.6                h0a44026_0    defaults
gettext                   0.19.8.1             h15daf44_3    defaults
glib                      2.56.2               hd9629dc_0    defaults
icu                       58.2                 h4b95b61_1    defaults
idna                      2.8                      py37_0    defaults
importlib_metadata        0.23                     py37_0    defaults
ipykernel                 5.1.2            py37h39e3cac_0    defaults
ipython                   7.8.0            py37h39e3cac_0    defaults
ipython_genutils          0.2.0                    py37_0    defaults
ipywidgets                7.5.1                      py_0    defaults
jedi                      0.15.1                   py37_0    defaults
jinja2                    2.10.3                     py_0    defaults
jpeg                      9b                   he5867d9_2    defaults
jsonschema                3.1.1                    py37_0    defaults
jupyter                   1.0.0                    py37_7    defaults
jupyter_client            5.3.4                    py37_0    defaults
jupyter_console           6.0.0                    py37_0    defaults
jupyter_core              4.6.0                    py37_0    defaults
libcxx                    4.0.1                hcfea43d_1    defaults
libcxxabi                 4.0.1                hcfea43d_1    defaults
libedit                   3.1.20181209         hb402a30_0    defaults
libffi                    3.2.1                h475c297_4    defaults
libiconv                  1.15                 hdd342a3_7    defaults
libpng                    1.6.37               ha441bb4_0    defaults
libsodium                 1.0.16               h3efe00b_0    defaults
markupsafe                1.1.1            py37h1de35cc_0    defaults
mistune                   0.8.4            py37h1de35cc_0    defaults
more-itertools            7.2.0                    py37_0    defaults
nbconvert                 5.6.0                    py37_1    defaults
nbformat                  4.4.0                    py37_0    defaults
ncurses                   6.1                  h0a44026_1    defaults
notebook                  6.0.1                    py37_0    defaults
openssl                   1.1.1d               h1de35cc_3    defaults
pandoc                    2.2.3.2                       0    defaults
pandocfilters             1.4.2                    py37_1    defaults
parso                     0.5.1                      py_0    defaults
pcre                      8.43                 h0a44026_0    defaults
pexpect                   4.7.0                    py37_0    defaults
pickleshare               0.7.5                    py37_0    defaults
prometheus_client         0.7.1                      py_0    defaults
prompt_toolkit            2.0.10                     py_0    defaults
ptyprocess                0.6.0                    py37_0    defaults
pycosat                   0.6.3            py37h1de35cc_0    defaults
pycparser                 2.19                     py37_0    defaults
pygments                  2.4.2                      py_0    defaults
pyopenssl                 19.0.0                   py37_0    defaults
pyqt                      5.9.2            py37h655552a_2    defaults
pyrsistent                0.15.4           py37h1de35cc_0    defaults
pysocks                   1.7.1                    py37_0    defaults
python                    3.7.3                h359304d_0    defaults
python-dateutil           2.8.0                    py37_0    defaults
python.app                2                        py37_9    defaults
pyzmq                     18.1.0           py37h0a44026_0    defaults
qt                        5.9.7                h468cd18_1    defaults
qtconsole                 4.5.5                      py_0    defaults
readline                  7.0                  h1de35cc_5    defaults
requests                  2.22.0                   py37_0    defaults
ruamel_yaml               0.15.46          py37h1de35cc_0    defaults
send2trash                1.5.0                    py37_0    defaults
setuptools                41.4.0                   py37_0    defaults
sip                       4.19.8           py37h0a44026_0    defaults
six                       1.12.0                   py37_0    defaults
sqlite                    3.30.0               ha441bb4_0    defaults
terminado                 0.8.2                    py37_0    defaults
testpath                  0.4.2                    py37_0    defaults
tk                        8.6.8                ha441bb4_0    defaults
tornado                   6.0.3            py37h1de35cc_0    defaults
tqdm                      4.36.1                     py_0    defaults
traitlets                 4.3.3                    py37_0    defaults
urllib3                   1.24.2                   py37_0    defaults
wcwidth                   0.1.7                    py37_0    defaults
webencodings              0.5.1                    py37_1    defaults
widgetsnbextension        3.5.1                    py37_0    defaults
xz                        5.2.4                h1de35cc_4    defaults
yaml                      0.1.7                hc338f04_2    defaults
zeromq                    4.3.1                h0a44026_3    defaults
zipp                      0.6.0                      py_0    defaults
zlib                      1.2.11               h1de35cc_3    defaults

@soapy1 soapy1 added good first issue great for new contributors, code change is envisioned to be trivial/relatively straight-forward type::bug describes erroneous operation, use severity::* to classify the type labels Oct 23, 2019
@lukoshkin
Copy link

Does it work now for any conda installation or just for anaconda? I experience the same bug as in the issue with miniconda. conda init zsh creates .zshrc in $HOME, despite ZDOTDIR is defined and distinct from HOME.

@trallnag
Copy link

@cjmartian, this issue is still occurring

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Oct 18, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue great for new contributors, code change is envisioned to be trivial/relatively straight-forward locked [bot] locked due to inactivity type::bug describes erroneous operation, use severity::* to classify the type
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants