Skip to content

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

Merged
zimbatm merged 1 commit intodirenv:masterfrom
srstsavage:anaconda-detect-env-name
Apr 17, 2022
Merged

feat: allow conda environment names to be detected from environment.yml#909
zimbatm merged 1 commit intodirenv:masterfrom
srstsavage:anaconda-detect-env-name

Conversation

@srstsavage
Copy link
Copy Markdown
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
Copy Markdown
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