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

How to not reset PATH environment variable? #290

Open
YanzhaoW opened this issue Aug 19, 2023 · 1 comment
Open

How to not reset PATH environment variable? #290

YanzhaoW opened this issue Aug 19, 2023 · 1 comment

Comments

@YanzhaoW
Copy link

Hi,

I am using following configurations:

    - uses: conda-incubator/setup-miniconda@v2
      with:
        miniconda-version: "latest"
        activate-environment: python-env
        python-version: 3.11
        channels: conda-forge
        environment-file: "python_environment.yml"
        auto-activate-base: true
    - name: test
      run: |
        conda info
        echo $PATH
      shell: bash -el {0}

This reset the PATH environment because of login shell. The problem is PATH environment is crucial and if it's always reset, I cannot change it in other steps. But if I don't choose the login shell, conda activate is not available.

How do I activate the conda environment while keeping the PATH environment variable set from other steps?

Thanks

@goanpeca
Copy link
Member

I am not asure what we could do about this, as you mention, conda activation depends on -el flags. @conda-incubator/setup-miniconda, thougths?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants