setup-miniconda icon indicating copy to clipboard operation
setup-miniconda copied to clipboard

How to not reset PATH environment variable?

Open YanzhaoW opened this issue 10 months ago • 1 comments

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

YanzhaoW avatar Aug 19 '23 14:08 YanzhaoW