Issues finding existing conda env, caused by `environment.yml` line endings
Opened this issue · 0 comments
onavhamid commented
Thanks for this script! Had been working great for me with the exception of one repository. Entering via the terminal kicked off the correct creation of the environment. However, once created, the conda_auto_env
script failed to find it. So it would again try to create it, but conda would warn that the env already exists. This cycle would continue.
Some digging lead pointed to the line endings of the environment.yml
file. The problematic repository had windows-based line endings.
> cat -e environment.yml
name: SampleName^M$
dependencies:^M$
- python=3.10^M$
- pip=22.1^M$
Repositories that worked fine had unix endings:
> cat -e environment.yml
name: AnotherSampleName$
dependencies:$
- python=3.9.5$
- bokeh=2.3.2$
From my brief exploration, it appears this line:
conda-auto-env/conda_auto_env.sh
Line 19 in 0ab80fa