Skip to content

feat: allow conda environment names to be detected from environment.yml #909

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

Merged
merged 1 commit into from
Apr 17, 2022

Conversation

srstsavage
Copy link
Contributor

Currently an error is encountered if an environment name is not
specified to layout anaconda. This change attempts to detect
the environment name from the environment.yml file by grepping
for the name property and processing the result.

The result is that .envrc files can now simply contain
layout anaconda as long as the local environment.yml
file specifies a name.

No new dependencies are introduced as grep is already used
and additional processing is performed using Bash parameter
expansion.

@srstsavage srstsavage force-pushed the anaconda-detect-env-name branch from 2227e90 to 09ec7c9 Compare March 18, 2022 23:00
Currently an error is encountered if an environment name is not
specified to `layout anaconda`. This change attempts to detect
the environment name from the environment.yml file by grepping
for the `name` property and processing the result.

The result is that .envrc files can now simply contain
`layout anaconda` as long as the local environment.yml
file specifies a `name`.

No new dependencies are introduced as `grep` is already used
and additional processing is performed using Bash parameter
expansion.
@srstsavage srstsavage force-pushed the anaconda-detect-env-name branch from 09ec7c9 to 77a33a0 Compare March 18, 2022 23:01
@srstsavage srstsavage changed the title feat: allow conda environment names to be detected from environemnt.yml feat: allow conda environment names to be detected from environment.yml Mar 18, 2022
@srstsavage
Copy link
Contributor Author

plane

@zimbatm zimbatm merged commit f213727 into direnv:master Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants