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

lowercase environment variables not showing #13713

Open
2 tasks done
krishnaispresent opened this issue Mar 20, 2024 · 0 comments · May be fixed by #13904
Open
2 tasks done

lowercase environment variables not showing #13713

krishnaispresent opened this issue Mar 20, 2024 · 0 comments · May be fixed by #13904
Assignees
Labels
backlog issue has been triaged but has not been earmarked for any upcoming release source::anaconda created by members of Anaconda, Inc. type::bug describes erroneous operation, use severity::* to classify the type

Comments

@krishnaispresent
Copy link

krishnaispresent commented Mar 20, 2024

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

When setting environment variables in his conda environment, by using lowercase letters for the variable key, it appears conda sets the key to uppercase when it sets the variable:

(base) krishna@Krishnas-MBP ~ % conda env config vars set my_test_var="hello" -n envvartest
(base) krishna@Krishnas-MBP ~ % conda activate envvartest
(envvartest) krishna@Krishnas-MBP ~ % echo $my_test_var

(envvartest) krishna@Krishnas-MBP ~ % echo $MY_TEST_VAR
hello
(envvartest) krishna@Krishnas-MBP ~ % conda env config vars list
my_test_var = hello

Snippet from activate.py:

        # split provided environment variables into exports vs unsets
        for name, value in kwargs.items():
            if value is None:
                unset_vars.append(name.upper())
            else:
                export_vars[name.upper()] = value

Conda Info

(base) krishna@Krishnas-MBP Desktop % conda info


     active environment : base
    active env location : /Users/krishna/anaconda3
            shell level : 1
       user config file : /Users/krishna/.condarc
 populated config files : /Users/krishna/.condarc
          conda version : 24.1.2
    conda-build version : 3.27.0
         python version : 3.11.5.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=m1
                          __conda=24.1.2=0
                          __osx=14.2=0
                          __unix=0=0
       base environment : /Users/krishna/anaconda3  (writable)
      conda av data dir : /Users/krishna/anaconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.cloud/repo/main/osx-arm64
                          https://repo.anaconda.cloud/repo/main/noarch
                          https://repo.anaconda.cloud/repo/r/osx-arm64
                          https://repo.anaconda.cloud/repo/r/noarch
                          https://repo.anaconda.cloud/repo/msys2/osx-arm64
                          https://repo.anaconda.cloud/repo/msys2/noarch
          package cache : /Users/krishna/anaconda3/pkgs
                          /Users/krishna/.conda/pkgs
       envs directories : /Users/krishna/anaconda3/envs
                          /Users/krishna/.conda/envs
               platform : osx-arm64
             user-agent : conda/24.1.2 requests/2.31.0 CPython/3.11.5 Darwin/23.2.0 OSX/14.2 solver/libmamba conda-libmamba-solver/24.1.0 libmambapy/1.5.6 aau/0.4.3 aid/0.2 c/K6Y_tgzE61NMBdNRKNUxaA s/60Vc_tQZDQxuXbiPHYHmug e/Z7_eIk9xGDoUDDdmsJvWkA
                UID:GID : 502:20
             netrc file : None
           offline mode : False


(base) krishna@Krishnas-MBP Desktop %

Conda Config

No response

Conda list

(base) krishna@Krishnas-MBP Desktop % conda config --show-sources

==> /Users/krishna/.condarc <==
aggressive_update_packages:
  - ca-certificates
  - certifi
  - openssl
channels:
  - defaults
default_channels:
  - https://repo.anaconda.cloud/repo/main
  - https://repo.anaconda.cloud/repo/r
  - https://repo.anaconda.cloud/repo/msys2
restore_free_channel: False

Additional Context

No response

@krishnaispresent krishnaispresent added the type::bug describes erroneous operation, use severity::* to classify the type label Mar 20, 2024
@travishathaway travishathaway added the source::anaconda created by members of Anaconda, Inc. label Mar 21, 2024
@travishathaway travishathaway added the backlog issue has been triaged but has not been earmarked for any upcoming release label Apr 3, 2024
@ForgottenProgramme ForgottenProgramme self-assigned this Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog issue has been triaged but has not been earmarked for any upcoming release source::anaconda created by members of Anaconda, Inc. type::bug describes erroneous operation, use severity::* to classify the type
Projects
Status: 🆕 New
Development

Successfully merging a pull request may close this issue.

3 participants